-/*
- * Called as the user scrolls/zooms around to aniplate hrefs of the
- * view tab and various other links
- */
-function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,objtype,objid) {
- var toPrecision = zoomPrecision(zoom);
- var node;
-
- lat = toPrecision(lat);
- lon = toPrecision(lon);
-
- if (minlon) {
- minlon = toPrecision(minlon);
- minlat = toPrecision(minlat);
- maxlon = toPrecision(maxlon);
- maxlat = toPrecision(maxlat);
- }
-
- $(".geolink").each(function (index, link) {
- var args = getArgs(link.href);
-
- if ($(link).hasClass("llz")) {
- args.lat = lat;
- args.lon = lon;
- args.zoom = zoom;
- } else if (minlon && $(link).hasClass("bbox")) {
- args.bbox = minlon + "," + minlat + "," + maxlon + "," + maxlat;
- }
-
- if (layers && $(link).hasClass("layers")) {
- args.layers = layers;
- }
-
- if (objtype && $(link).hasClass("object")) {
- args[objtype] = objid;
- }
-
- var classes = $(link).attr("class").split(" ");
-
- $(classes).each(function (index, classname) {
- if (match = classname.match(/^minzoom([0-9]+)$/)) {
- var minzoom = match[1];
- var name = link.id.replace(/anchor$/, "");
-
- $(link).off("click.minzoom");
+function normalBounds(bounds) {
+ if (bounds instanceof L.LatLngBounds) return bounds;
+ return new L.LatLngBounds(
+ new L.LatLng(bounds[0][0], bounds[0][1]),
+ new L.LatLng(bounds[1][0], bounds[1][1]));
+}