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

Add popup options to DynamicMapLayer #1031

Merged
merged 2 commits into from
Dec 21, 2017
Merged

Add popup options to DynamicMapLayer #1031

merged 2 commits into from
Dec 21, 2017

Conversation

Biboba
Copy link
Contributor

@Biboba Biboba commented Dec 11, 2017

Add through a "popup" option to the DynamicMapLayer constructor, the ability to pass identify options into bindPopup (issue 633)

Copy link
Contributor

@jgravois jgravois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much for tackling this old feature request!

var identifyRequest = this.identify().on(this._map).at(e.latlng);
var identifyRequest;
if (this.options.popup) {
identifyRequest = this.options.popup.on(this._map).at(e.latlng);
Copy link
Contributor

@jgravois jgravois Dec 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i pushed a small change here to call IdentifyFeatures.on() dynamically even when a custom popup constructor option has been bound to the layer. this is beneficial for two reasons.

  1. it avoids an error when on() wasn't chained prior.
  2. even if the method was chained, it avoids passing a stale extent through in the request if the map was panned or zoomed after the layer was instantiated.

@jgravois jgravois merged commit dea46a7 into Esri:master Dec 21, 2017
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
Add popup options to DynamicMapLayer
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.

2 participants