Skip to content

Instantly share code, notes, and snippets.

@joshualambert
Created October 24, 2012 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshualambert/3947035 to your computer and use it in GitHub Desktop.
Save joshualambert/3947035 to your computer and use it in GitHub Desktop.
Map Code
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(33.219105,-87.046053),
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
// Current Position Marker.
var marker1 = new google.maps.Marker({
position:new google.maps.LatLng(33.219105,-87.046053),
map:map,
anchor: new google.maps.Point(160, 32),
icon:'../images/mapMarkerAlt.png' // This path is the custom pin to be shown. Remove this line and the proceeding comma to use default pin
});
// Apply DROP animation.
marker1.setAnimation(google.maps.Animation.DROP);
// Generate map marker RING image,
homeMarkerImage = new google.maps.MarkerImage(
'../images/animatedCircle/cir-18.png',
new google.maps.Size(100,100), // size
new google.maps.Point(0,0), // origin
new google.maps.Point(54, 59) // anchor
);
// Attach ring image to map marker.
window.homeMarker = new google.maps.Marker({
position:new google.maps.LatLng(33.219105,-87.046053),
map:map,
title:"Check this cool location",
icon:homeMarkerImage
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment