- var extents = unproj(map.getExtent());
- var expiry = new Date();
-
- updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, params.object);
+ var extents = map.getBounds().wrap();
+
+ updatelinks(center.lng,
+ center.lat,
+ zoom,
+ layers,
+ extents.getWest(),
+ extents.getSouth(),
+ extents.getEast(),
+ extents.getNorth(),
+ params.object);