Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
Created June 9, 2011 10:06
Show Gist options
  • Save feedhenry-gists/1016460 to your computer and use it in GitHub Desktop.
Save feedhenry-gists/1016460 to your computer and use it in GitHub Desktop.
Mapping Example Showing Placemarks
$fh.act({
act: 'getPlacemarks',
req: {
lat: lat,
lon: lon
}
}, function (res) {
var points = res.points;
// Iterate over the points array, adding each to the map
for (var pi=0,pl=points.length; pi<pl; pi++) {
var point = points[pi];
// Create the marker, then add it to the map
var pos = new google.maps.LatLng(point.lat, point.lon);
var marker = new google.maps.Marker({
position: pos,
map: self.map,
title: point.title
});
}
}, function (code, errorprops, params) {
// something went wrong. Show error
alert(code);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment