if (lon > maxLon) {
maxLon = lon;
}
- }
- var myPoint = new mxn.LatLonPoint(minLat + Math.abs(maxLat - minLat)/2,
- minLon + Math.abs(maxLon - minLon)/2);
+ 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);
+ }
- // display the map centered on a latitude and longitude (Google zoom levels)
+ bounds = new mxn.BoundingBox(minLat, minLon, maxLat, maxLon);
- mapstraction.setCenterAndZoom(myPoint, 9);
+ mapstraction.setBounds(bounds);
});