Created
June 9, 2011 10:05
-
-
Save feedhenry-gists/1016459 to your computer and use it in GitHub Desktop.
Mapping Example Showing
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
show: function () { | |
var lat = 52.88, | |
lon = -7.96; | |
//Pass lat & lon into map api, initialising map at that point | |
$fh.map({ | |
target: '#maps_div', | |
lat: lat, | |
lon: lon, | |
zoom: 15 | |
}, function (res) { | |
// Keep the reference to the map object; | |
self.map = res.map; | |
// Map is being shown, lets populate it with data points | |
self.populateMap(lat, lon); | |
}, function (error) { | |
// something seriously wrong here. Show error | |
alert(error); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment