Popup for Basemaps?

168
3
Jump to solution
04-18-2024 08:00 AM
jjgarrett0
New Contributor II

Is there a way to use popups on the basemaps? Specifically the World Imagery layer. I have a request to include satellite imagery source dates in the popups, but I can't seem to find a straight forward way of setting up popups for the basemaps.

 

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Justin_Greco
Occasional Contributor II

An easier option would be to add https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/0 to your map as a feature layer, by default it appears fully transparent with popups enabled.

View solution in original post

3 Replies
Justin_Greco
Occasional Contributor II

There is no way to display a pop up for a Tile Layer.  What you could do is have a click event on your map view, then query the World Image service using that point (https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/0/query).  Since there can be different imagery at the same location at different zoom levels you’d need to include a where statement to check if your current zoom level is between the MinZoomLevel and MaxZoomLevel.  The response will return a SRC_DATE2 field, which is the source date.  Then display a popup at the click location for the returned polygon.

0 Kudos
Justin_Greco
Occasional Contributor II

An easier option would be to add https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/0 to your map as a feature layer, by default it appears fully transparent with popups enabled.

jjgarrett0
New Contributor II

Thank you! Sorry for the late response but I didn't get notified that I had any responses to this! I ended up utilizing the world imagery feature layer as you suggest.

0 Kudos