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

fire appropriate feature events when entire featureLayer is toggled #790

Merged
merged 1 commit into from
Jul 4, 2016

Conversation

jgravois
Copy link
Contributor

@jgravois jgravois commented Jun 24, 2016

resolves #788

previously the addfeature and removefeature events were specific to situations in which an individual feature was appended or dropped from the collection associated with a layer that was currently being drawn (typically because of panning and zooming).

this change extends the logic to fire removefeature events for individual features when the entire layer is removed from the map.
for consistency, i also ensured that addfeature fires both when a featureLayer is added to the map initially, and again after it is toggled back on.

cc/ @denydias

@jgravois jgravois merged commit 619e2dd into Esri:master Jul 4, 2016
@jgravois jgravois deleted the patch788 branch July 4, 2016 01:18
@mepdr
Copy link

mepdr commented Nov 11, 2016

@jgravois with this PR calling setWhere results in firing the addfeature event twice.
see http://jsbin.com/kiripelipa/edit?html,output

@jgravois
Copy link
Contributor Author

thanks for the repro case. please open a new issue for this to help us track the bug report.

jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
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.

L.esri.FeatureLayer addfeature and removefeature events not fired at all
2 participants