summaryrefslogtreecommitdiff
path: root/plugins/Mapstraction
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-19 11:51:15 -0500
committerEvan Prodromou <evan@status.net>2009-11-19 11:51:15 -0500
commitae710f20d8356dfe4f8002eeaf40e38211caf3b5 (patch)
tree0f2e4041e90a84828cfdc86a3ce649b58464afbb /plugins/Mapstraction
parent7e8ce8fe8dce936b678208716e007334abc43b62 (diff)
add markers for each notice and show the bounding box correctly
Diffstat (limited to 'plugins/Mapstraction')
-rw-r--r--plugins/Mapstraction/usermap.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/Mapstraction/usermap.js b/plugins/Mapstraction/usermap.js
index 169686a50..41bdb677b 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);
});