-
Notifications
You must be signed in to change notification settings - Fork 799
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
Add contorl for returnGeometry
to dynamicMapLayer.bindPopup
to reduce (unnecessary) load
#919
Comments
I notice we can change |
returnGeometry
to dynamicMapLayer.bindPopup
to reduce (unnecessary) load
thanks for the report! we're actually already discussing this in #633, so i'm going to go ahead and close this ticket and continue tracking there. until we settle on a way to expose more fine grained control via bindPopup, you should consider calling map.on('click', function (evt) {
districtMap.identify()
.on(map)
.at(evt.latlng)
.returnGeometry(false)
.run(function(error, featureCollection, response){
console.log("abc");
});
}) |
its obviously not the same as skipping returning geometry entirely, but it would also be worth investigating applying a scale appropriate maxAllowableOffset to the identify request fired by bindPopup() automatically to help in edge cases where the original geometry is extremely vertex dense. |
Chrome 55, IE11
L.version
):1.0.3
L.esri.VERSION
):2.0.7
Steps to reproduce the error:
DynamicMapLayer
in leafletbindPopup
to layer and returnfeature's labelfeatureCollection.features[0].properties.Label
abc
as popup contentWhat happens is [long response time caused by
GET
-ing entire GeoJson object from server].I was expecting [to get feature's properties alone without getting the whole
geometry
set. User should at least be able to choose if they want to getgeometry
. By choosing to load the layer asdynamicMapLayer
, some (at least me) were avoiding prolonged loading time & complex svg's building time].( jsbin that demonstrates the problem, click on the polygon near City of Houston and you will recreate the freeze)
The text was updated successfully, but these errors were encountered: