Reputation: 163
I am looking for solution of my requirement. I have list of apartments and i need my map should show location of apartment and highlight that location marker by changing its color on-hover of div in list. The example can be seen below. I want to make it work in my wordpress site
Do we have any plugin or solutions?
Upvotes: 0
Views: 1014
Reputation: 4950
Each Maps JavaScript API object exports a number of named events. Programs interested in certain events will register JavaScript event listeners for those events and execute code when those events are received by calling addListener() to register event handlers on the object.
Some objects within the Google Maps JavaScript API are designed to respond to user events such as mouse or keyboard
To register for event notifications, use the addListener() event handler. That method takes an event to listen for, and a function to call when the specified event occurs.
google.maps.event.addListener(object,"mouseover",function() {
// your code
});
I did some research and found this blog, discuss how to highlight map on mouse hover: https://gis.stackexchange.com/questions/14642/how-to-highlight-the-area-in-google-map-on-mouse-hover
Upvotes: 1