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

reverse simplification scale and ensure bindPopup simplifies output geometry #921

Merged
merged 2 commits into from
Feb 7, 2017

Conversation

jgravois
Copy link
Contributor

@jgravois jgravois commented Jan 31, 2017

resolves #919 (partially anyway)

this patch applies a simplification factor of 0.5 to output geometries in dynamicMapLayer.bindPopup using the current scale of the map to ensure that no more vertices than necessary are retrieved from the server.

for the test case provided by the user, this reduced the payload from 213kb/600ms to 922b/150ms when zoomed out pretty far on a complex feature.

screenshot 2017-01-31 12 21 28

i think this is a sensible default so that we can ensure in more cases that the map click interaction is snappy.

this patch applies a simplification factor of 0.5 to output geometries in bindPopup using the current scale of the map to ensure that no more vertices than necessary are retrieved from the server.

for the test case provided by the user, this reduced the payload from 213kb/600ms to 922b/150ms without visible evidence on screen when zoomed out far on a complex feature
@jgravois
Copy link
Contributor Author

jgravois commented Jan 31, 2017

in testing this change i noticed that the simplification scale for Query increases from 0 to 1 as more generalization is applied to the geometry.

i've added another commit here to ensure that IdentifyFeatures is consistent with Query (and its own documentation) and not reversed.

@jgravois jgravois changed the title ensure bindPopup simplifies output geometry slightly reverse simplification scale and ensure bindPopup simplifies output geometry Jan 31, 2017
@jgravois jgravois merged commit e751206 into Esri:master Feb 7, 2017
@jgravois jgravois deleted the patch919 branch February 7, 2017 21:04
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
reverse simplification scale and ensure bindPopup simplifies output geometry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add contorl for returnGeometry to dynamicMapLayer.bindPopup to reduce (unnecessary) load
1 participant