+ function boundsChanged() {
+ var epsg4326 = new OpenLayers.Projection("EPSG:4326");
+ var bounds = new OpenLayers.Bounds($("export_minlon").value,
+ $("export_minlat").value,
+ $("export_maxlon").value,
+ $("export_maxlat").value);
+
+ bounds.transform(epsg4326, map.getProjectionObject());
+
+ map.events.unregister("moveend", map, mapMoved);
+ map.zoomToExtent(bounds);
+
+ box.handler.clear();
+ box.handler.feature = new OpenLayers.Feature.Vector(bounds.toGeometry());
+ box.handler.layer.addFeatures([box.handler.feature], [box.handler.style]);
+ box.handler.layer.drawFeature(box.handler.feature, box.handler.style);
+ }
+
+ $("export_maxlat").onchange = function() { boundsChanged() };
+ $("export_minlon").onchange = function() { boundsChanged() };
+ $("export_maxlon").onchange = function() { boundsChanged() };
+ $("export_minlat").onchange = function() { boundsChanged() };
+