add markers for each notice and show the bounding box correctly

This commit is contained in:
Evan Prodromou 2009-11-19 11:51:15 -05:00
parent 7e8ce8fe8d
commit ae710f20d8

View File

@ -28,12 +28,17 @@ $(document).ready(function() {
if (lon > maxLon) { if (lon > maxLon) {
maxLon = lon; maxLon = lon;
} }
pt = new mxn.LatLonPoint(lat, lon);
mkr = new mxn.Marker(pt);
mkr.setIcon(n['user']['profile_image_url']);
mkr.setInfoBubble(n['html']);
mapstraction.addMarker(mkr);
} }
var myPoint = new mxn.LatLonPoint(minLat + Math.abs(maxLat - minLat)/2, bounds = new mxn.BoundingBox(minLat, minLon, maxLat, maxLon);
minLon + Math.abs(maxLon - minLon)/2);
// display the map centered on a latitude and longitude (Google zoom levels) mapstraction.setBounds(bounds);
mapstraction.setCenterAndZoom(myPoint, 9);
}); });