Last active
December 10, 2015 18:28
-
-
Save niraj-shah/4474306 to your computer and use it in GitHub Desktop.
The success function
This file contains hidden or 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
function success(position) { | |
// variable to store the coordinates | |
var location = position.coords.latitude + ',' + position.coords.longitude; | |
// select the span with id status | |
var s = $('#status'); | |
// update the status message | |
s.html('found you!'); | |
// Google Maps image using location | |
$('#wrapper').append('<img src="http://maps.google.com/maps/api/staticmap?center='+ location + | |
'&zoom=17&markers=size:medium|color:red|'+ location + | |
'&path=color:0x0000FF80|weight:2|'+ location + | |
'&size=480x360&sensor=false" />'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment