Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify maxItems cfg option removed #4238

Closed
pgssimon opened this issue Sep 23, 2019 · 10 comments
Closed

Identify maxItems cfg option removed #4238

pgssimon opened this issue Sep 23, 2019 · 10 comments

Comments

@pgssimon
Copy link
Contributor

pgssimon commented Sep 23, 2019

Description

Hi
In one of my localConfig.json I have set maxItems for the Identify plugin

        {
            "name": "Identify",
            "cfg": {
                "showHighlightFeatureButton": true,
                "draggable": false,
                "dock": true,
                "viewerOptions": {
                  "container": "{context.ReactSwipe}"
                },
                "maxItems": 200
            },
            "override": {
                "Toolbar": {
                    "position": 11
                }
            }
        },

However this cfg setting is no longer available, is there a replacement setting that I have missed?

Was removed at this commit...

e68ce42#diff-cb0e46ea9c7290f7a328445a8d05f9d7

This is very important as we are not able to display the correct number of records, for instance in the screenshot below there should be 39 Building Consents...

wairoa_identify_error_no_records_displayed

Cheers
Si

@mbarto
Copy link
Contributor

mbarto commented Sep 24, 2019

@pgssimon you are right, it's a regression
@offtherailz we could probably move the missing identify options that were in the plugin config in the mapInfo state, so that they can be overridden by localConfig.json

@offtherailz
Copy link
Member

offtherailz commented Sep 27, 2019

The options originally was get from the graphic component properties.
After the refactoring maps the options with this selector.

const identifyOptionsSelector = createStructuredSelector({
format: generalInfoFormatSelector,
map: mapSelector,
point: clickPointSelector,
currentLocale: currentLocaleSelector
});

A couple of changes like the followings should restore the possibility to customize maxItems :

const identifyOptionsSelector = createStructuredSelector({
        format: generalInfoFormatSelector,
        map: mapSelector,
        point: clickPointSelector,
        currentLocale: currentLocaleSelector,
+       maxItems: (state) => get(state, "mapInfo.configuration.maxItems", 10);
    });

--> localConfig default state

"mapInfo": {
    "enabled": true, // enabled by default
    "disabledAlwaysOn": false, // if true, disable always on setup
    "configuration": {
      "showEmptyMessageGFI": false // allow or deny the visiibility of message when you have no results from identify request
      "infoFormat": "text/plain" // default infoformat value, other values are "text/html" for text only or "application/json" for properties,
+     "maxItems": 50
    }
  }

This proposed solution supports again to maxItems (even "params" should work) from the state, editing it as documented here here

@pgssimon
Copy link
Contributor Author

@offtherailz that would be perfect

@tdipisa tdipisa added this to the 2020.01.01 milestone Jan 15, 2020
@tdipisa tdipisa modified the milestones: 2020.01.01, 2020.02.01 Mar 11, 2020
@tdipisa tdipisa modified the milestones: 2020.02.01, 2020.02.02 May 13, 2020
@tdipisa
Copy link
Member

tdipisa commented Sep 25, 2020

/remind me monday

@reminders reminders bot added the reminder label Sep 25, 2020
@reminders
Copy link

reminders bot commented Sep 25, 2020

@tdipisa set a reminder for Sep 28th 2020

@reminders reminders bot removed the reminder label Sep 28, 2020
@reminders
Copy link

reminders bot commented Sep 28, 2020

👋 @tdipisa,

@myrdstom
Copy link
Contributor

This Github issue has a code suggestion which I have implemented. I am however unsure how exactly to recreate and test it out. Any assistance would be appreciated

@MV88
Copy link
Contributor

MV88 commented Oct 21, 2020

Hi @pgssimon I recently tested in DEV and was able to fetch 67 items in a layer

so i am wondering if this issue is still valid

May you double check it?

@MV88 MV88 closed this as completed Oct 21, 2020
@MV88 MV88 reopened this Oct 21, 2020
@MV88
Copy link
Contributor

MV88 commented Oct 21, 2020

We would like to reintroduce the maxItems aswell

@pgssimon
Copy link
Contributor Author

I am currently setting up a new server with MapStore 2020.02.01 will check against that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants