Is there a way to add mouseover state to a marker in Google Maps embedded in Java app via JxMaps? I was looking for a way to show whether the marker is clickable or not on hover. However, I didn’t find a suitable method that sets this icon the API
            Asked
            
        
        
            Active
            
        
            Viewed 199 times
        
    1 Answers
1
            To implement functionality like this, you have to attach to marker mouse events and change marker icon (using Marker.setIcon method) depending on mouse position.
marker.addEventListener("mouseover", new MapEvent() {
   @Override
   public void onEvent() {
      marker.setIcon(hoverIcon);
   }
}});
marker.addEventListener("mouseout", new MapEvent() {
   @Override
   public void onEvent() {
      marker.setIcon(normalIcon);
   }
}});
        Vitaly Eremenko
        
- 341
 - 1
 - 5