Problem: PictureMarker (graphic) and Infowindow appear at same time

1052
1
01-05-2017 12:05 PM
RolandoFlorez
New Contributor III

I put a marker symbol in the map every time when the user click there, then, I enable the popup for a specific layer. When I click the map, It shows both marker and infowindow. It should not show the infowindow because is enabled for a layer (point, polygon...) not for basemap.
At basemap only should appear the marker, and if the click coincides with the layer too, they will appear this two elements..

Why this is happening? What is the solution?

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Rolando,

  It is happen because the way that an ArcGISDynamicMapServiceLayer handles popups. Because ArcGISDynamicMapServiceLayer does not actually have geometry on the client side (it is only an image), it has to do a query for each map click and the deferred of the query will show a popup containing the results of the map point query (either the results or no results).

   You can limit the appearance of the popup by using map.infoWindow.hideDelay = 0; and map.infoWindow.visibleWhenEmpty = false; But you will still see the popup with "Searching..." in it until the query returns from the server.