Skip to content

Instantly share code, notes, and snippets.

@rickywid
Created October 25, 2015 06:50
Show Gist options
  • Save rickywid/b25b8cbeec59249517a7 to your computer and use it in GitHub Desktop.
Save rickywid/b25b8cbeec59249517a7 to your computer and use it in GitHub Desktop.
:javascript
function initMap() {
var myLatLng = {lat: #{@user.latitude}, lng: #{@user.longitude} };
var map = new google.maps.Map(document.getElementById('map'), {
center: myLatLng,
zoom: 17
});
var marker = new google.maps.Marker({
position: myLatlng,
title:"Hello World!",
map: map
});
}
https://developers.google.com/maps/documentation/javascript/markers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment