Created
June 4, 2012 22:11
-
-
Save amiel/2871121 to your computer and use it in GitHub Desktop.
google maps api v3 custom icons hack for Internet Explorer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var point = xxx; // set from geolocation | |
var image = new google.maps.MarkerImage( | |
map_icon, | |
new google.maps.Size(18,29), | |
new google.maps.Point(0,0), | |
new google.maps.Point(0,29) | |
); | |
var marker = new google.maps.Marker({ | |
draggable: true, | |
raiseOnDrag: false, | |
icon: image, | |
map: map, | |
position: point | |
}); | |
// Stop the 'drag' event, and put the marker right back where it was. | |
google.maps.event.addListener(marker, 'drag', function(e) { | |
e.stop(); | |
marker.setPosition(point); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment