Created
September 28, 2012 11:46
-
-
Save electricputty/3799344 to your computer and use it in GitHub Desktop.
Marker parameters
This file contains 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
// Google Map Custom Marker Maker 2012 | |
// Please include the following credit in your code | |
// Sample custom marker code created with Google Map Custom Marker Maker | |
// http://powerhut.co.uk/googlemaps/custom_markers.php | |
var point = new google.maps.LatLng(50.875311, 0.351563); | |
var myMapOptions = { | |
zoom: 5, | |
center: point, | |
mapTypeId: google.maps.MapTypeId.TERRAIN | |
}; | |
var map = new google.maps.Map(document.getElementById("map"),myMapOptions); | |
var image = new google.maps.MarkerImage( | |
'marker-images/image.png', | |
new google.maps.Size(26,39), | |
new google.maps.Point(0,0), | |
new google.maps.Point(13,39) | |
); | |
var shadow = new google.maps.MarkerImage( | |
'marker-images/shadow.png', | |
new google.maps.Size(50,39), | |
new google.maps.Point(0,0), | |
new google.maps.Point(13,39) | |
); | |
var shape = { | |
coord: [25,0,25,1,25,2,24,3,23,4,22,5,21,6,20,7,21,8,21,9,21,10,22,11,22,12,22,13,22,14,22,15,21,16,21,17,21,18,20,19,20,20,19,21,18,22,17,23,16,24,16,25,16,26,15,27,15,28,15,29,14,30,14,31,14,32,13,33,13,34,13,35,12,36,12,37,12,38,10,38,10,37,9,36,9,35,9,34,8,33,8,32,8,31,7,30,7,29,7,28,6,27,6,26,6,25,5,24,5,23,4,22,3,21,2,20,2,19,1,18,1,17,0,16,0,15,0,14,0,13,0,12,0,11,0,10,1,9,1,8,2,7,2,6,3,5,4,4,6,3,8,2,21,1,24,0,25,0], | |
type: 'poly' | |
}; | |
var marker = new google.maps.Marker({ | |
draggable: true, | |
raiseOnDrag: false, | |
icon: image, | |
shadow: shadow, | |
shape: shape, | |
map: map, | |
position: point | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment