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

Sync Map does not work if the geometry is too complex #2452

Closed
2 of 6 tasks
offtherailz opened this issue Dec 4, 2017 · 1 comment · Fixed by #2462
Closed
2 of 6 tasks

Sync Map does not work if the geometry is too complex #2452

offtherailz opened this issue Dec 4, 2017 · 1 comment · Fixed by #2462

Comments

@offtherailz
Copy link
Member

Description

Using a complex spatial filter the cql_filter will be longer than max URL size. This happens mainly when you try to retrieve spatial filter from some geocoding service.

Please indicate if this issue is related to a bug or a new feature request

  • Bug
  • New Feature

In case of Bug (otherwise remove this paragraph)

Browser Affected
(use this site: https://www.whatsmybrowser.org/ for non expert users)

  • Internet Explorer
  • Chrome
  • Firefox
  • Safari

Steps to reproduce

  • Configure mapstore to use wfsGeocoder (or use an instance configured to do that, see info below).
  • Open feature grid for a vector layer
  • Open query panel
  • Select spatial filter from geocoder
  • Perform search
  • Activate query panel

Expected Result

  • The map is in sync with the filter

Current Result

  • You can not see changes or anything. Looking on dev tools you can see a lot of errors (url too long)

Notes

Not sure it is feasible in any map lib. Maybe OpenLayers provides a way to do some post request and so avoid the issue. Most probably this problem can not be fixed with Leaflet. Not sure about Cesium.

We should evaluate to catch the specific error and notify the user that syncmap can not be used in this condition.

Info

to configure the wfsGeoCoder you have to setup something like the following in localConfig.js (or open an instance that is already configured to do that).
See documentation

"spatialMethodOptions": [
  {"id": "Viewport", "name": "queryform.spatialfilter.methods.viewport"},
  {"id": "BBOX", "name": "queryform.spatialfilter.methods.box"},
  {"id": "Circle", "name": "queryform.spatialfilter.methods.circle"},
  {"id": "Polygon", "name": "queryform.spatialfilter.methods.poly"},
  {
      "id": "methodId",
      "name": "methodName",
      "type": "wfsGeocoder",
      "url": "urlToGeoserver",
      "filterProps": {
          "blacklist": [],
          "maxFeatures": 5,
          "predicate": "LIKE",
          "queriableAttributes": ["ATTRIBUTE_X"],
          "typeName": "workspace:typeName",
          "valueField": "ATTRIBUTE_Y"
      },
      "customItemClassName": "customItemClassName"
  }
@offtherailz
Copy link
Member Author

Other possibilities to evaluate for mitigation are:

  • Settings limits in Apache for some envrionment (possible mitigation, see this)
  • Using cross layer filtering in some use cases (same server with cross layer filtering available)

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

Successfully merging a pull request may close this issue.

2 participants