Closed dugdodotcom closed 10 years ago
I want to make when div mouseover then the icon change, like hovering.
handler = Gmaps.build("Google", markers: maxRandomDistance: null ) handler.buildMap provider: {} internal: id: "map-canvas" , -> markers = handler.addMarkers(ar) _.each ar, (json, index) -> json.marker = markers[index] $(".location-" + json.id).on("mouseover", -> json.picture = url: "http://maps.google.com/mapfiles/ms/icons/green-dot.png" width: 36 height: 36 console.log json.marker json.marker.setMap handler.getMap() json.marker.panTo() handler.removeMarker json.marker handler.addMarker json return ).on "mouseout", -> handler.removeMarker json.marker handler.addMarker json.marker return
return handler.bounds.extendWith markers handler.fitMapToBounds()
please ask questions on stackoverflow
https://stackoverflow.com/questions/25637790/when-mouseover-or-out-change-icon-marker
I want to make when div mouseover then the icon change, like hovering.
handler = Gmaps.build("Google", markers: maxRandomDistance: null ) handler.buildMap provider: {} internal: id: "map-canvas" , -> markers = handler.addMarkers(ar) _.each ar, (json, index) -> json.marker = markers[index] $(".location-" + json.id).on("mouseover", -> json.picture = url: "http://maps.google.com/mapfiles/ms/icons/green-dot.png" width: 36 height: 36 console.log json.marker json.marker.setMap handler.getMap() json.marker.panTo() handler.removeMarker json.marker handler.addMarker json return ).on "mouseout", -> handler.removeMarker json.marker handler.addMarker json.marker return