Skip to content

Instantly share code, notes, and snippets.

@mikevalstar
Created February 26, 2014 19:04
Show Gist options
  • Save mikevalstar/9236187 to your computer and use it in GitHub Desktop.
Save mikevalstar/9236187 to your computer and use it in GitHub Desktop.
var lat = parseFloat($('#coords latitude').html());
var lon = parseFloat($('#coords longitude').html());
var url = "https://maps.google.com/maps?q=" + $('#coords latitude').html() + "," + $('#coords longitude').html();
var myLatlng = new google.maps.LatLng(lat, lon);
var mapOptions = {
zoom: 14,
center: myLatlng
};
var map = new google.maps.Map(document.getElementById('map-contactus'), mapOptions);
//var marker =
new google.maps.Marker({
position: myLatlng,
map: map,
icon: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment