Select to view content in your preferred language

Remove marker highlight

5356
12
Jump to solution
01-21-2015 05:55 AM
DennisBranch
Deactivated User

Hello,

 

I'm creating a map that shows various points of interest. When I click on a POI marker, the marker gets highlighted by a blue-ish rectangle (as shown below)!

 

map.jpg

 

How can I remove that??

 

 

Thank you very much!

1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

You can set the highlight to false for the info window to remove the highlight symbol. Here's an example of how to do this:

      map = new Map("map", {
        basemap: "topo",
        center: [-118.4, 34.08],
        zoom: 14
      });
      map.infoWindow.set("highlight", false);

View solution in original post

12 Replies
TimWitt2
MVP Alum

Dennis,

is this in the javascript api?

Tim

0 Kudos
DennisBranch
Deactivated User

I forgot to mention that! Sorry!

Yes, it's in the javascript api!

0 Kudos
TimWitt2
MVP Alum

Maybe you could create a custom infowindow?

Check it here:

Custom info window | ArcGIS API for JavaScript

DennisBranch
Deactivated User

I will give it a try and see!

Thanks!

0 Kudos
KellyHutchins
Esri Frequent Contributor

You can set the highlight to false for the info window to remove the highlight symbol. Here's an example of how to do this:

      map = new Map("map", {
        basemap: "topo",
        center: [-118.4, 34.08],
        zoom: 14
      });
      map.infoWindow.set("highlight", false);
KenBuja
MVP Esteemed Contributor

Where is that documented in the help?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Ken Buja​  the highlight property is documented on the Popup class. The Popup is the default info window for the map so if you specify map.infoWindow that's the Popup.

KenBuja
MVP Esteemed Contributor

Thanks. It seems like that should be clarified in the documentation. The Popup page start with this statement

The Popup class is an implementation of InfoWindow that inherits from InfoWindowBase to provide additional capabilities.

I would expect that the methods and properties of the InfoWindow (such as "set") would be listed on the InfoWindow page.

KellyHutchins
Esri Frequent Contributor

Ken Buja​ we can do some work to clarify this on the Popup API ref but we wouldn't list it on the InfoWindow page. Popup inherits from InfoWindow so it has the Info Window methods and properties but it also has additional properties that are not available on the info window class.

Its currently confusing because the map.InfoWindow property by default is a Popup. We plan to standardize some of our terminology for the 4.0 release to help alleviate the confusion.