Created
October 25, 2015 05:53
-
-
Save rickywid/dc16add8a0ab2795de9d to your computer and use it in GitHub Desktop.
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
= link_to "Home", root_url | |
%h1= @user.name | |
%h2 nearby cities | |
- for name in @user.nearbys(25) | |
%li | |
= link_to name.name, @user | |
= name.distance.round(2) | |
miles | |
#map | |
:javascript | |
var map; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: @user.latitude, lng: @user.longitude}, | |
zoom: 8 | |
}); | |
} | |
%script{:async => "", :defer => "", :src => "https://maps.googleapis.com/maps/api/js?key=AIzaSyBdMDyASdvSs-EL3DUXLggdI9WKcZenQKg&callback=initMap"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment