- addObjectToMap(object, true, function(extent) {
- $("#loading").hide();
- $("#browse_map .geolink").show();
-
- if (extent) {
- $("a.bbox[data-editor=remote]").click(function () {
- return remoteEditHandler(extent);
- });
-
- $("a.object[data-editor=remote]").click(function () {
- return remoteEditHandler(extent, params.type + params.id);
- });
-
- $("#object_larger_map").show();
- $("#object_edit").show();
-
- var centre = extent.getCenter();
- updatelinks(centre.lng,
- centre.lat,
- 16, null,
- extent.getWestLng(),
- extent.getSouthLat(),
- extent.getEastLng(),
- extent.getNorthLat(),
- object);
- } else {
- $("#small_map").hide();
+ addObjectToMap(object, {
+ zoom: true,
+ callback: function(extent) {
+ $("#loading").hide();
+ $("#browse_map .geolink").show();
+
+ if (extent) {
+ $("a.bbox[data-editor=remote]").click(function () {
+ return remoteEditHandler(extent);
+ });
+
+ $("a.object[data-editor=remote]").click(function () {
+ return remoteEditHandler(extent, params.type + params.id);
+ });
+
+ $("#object_larger_map").show();
+ $("#object_edit").show();
+
+ var centre = extent.getCenter();
+ updatelinks(centre.lng,
+ centre.lat,
+ 16, null,
+ extent.getWest(),
+ extent.getSouth(),
+ extent.getEast(),
+ extent.getNorth(),
+ object);
+ } else {
+ $("#small_map").hide();
+ }