From ae710f20d8356dfe4f8002eeaf40e38211caf3b5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 19 Nov 2009 11:51:15 -0500 Subject: [PATCH] add markers for each notice and show the bounding box correctly --- plugins/Mapstraction/usermap.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/Mapstraction/usermap.js b/plugins/Mapstraction/usermap.js index 169686a504..41bdb677b4 100644 --- a/plugins/Mapstraction/usermap.js +++ b/plugins/Mapstraction/usermap.js @@ -28,12 +28,17 @@ $(document).ready(function() { 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); }); -- 2.39.5