From: Evan Prodromou Date: Thu, 19 Nov 2009 16:51:15 +0000 (-0500) Subject: add markers for each notice and show the bounding box correctly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ae710f20d8356dfe4f8002eeaf40e38211caf3b5;p=quix0rs-gnu-social.git add markers for each notice and show the bounding box correctly --- 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); });