Ajaxify the export tab.
This commit is contained in:
parent
d13ef1db02
commit
599c48227a
8 changed files with 58 additions and 176 deletions
|
@ -60,10 +60,11 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
var vectors;
|
||||
var box;
|
||||
|
||||
function startExport() {
|
||||
var vectors = new OpenLayers.Layer.Vector("Vector Layer", {
|
||||
vectors = new OpenLayers.Layer.Vector("Vector Layer", {
|
||||
displayInLayerSwitcher: false,
|
||||
});
|
||||
map.addLayer(vectors);
|
||||
|
@ -83,9 +84,24 @@
|
|||
box.activate();
|
||||
|
||||
map.events.register("moveend", map, mapMoved);
|
||||
|
||||
$("viewanchor").className = "";
|
||||
$("exportanchor").className = "active";
|
||||
|
||||
openSidebar({ onclose: stopExport });
|
||||
|
||||
updateRegion(map.getExtent());
|
||||
}
|
||||
|
||||
function stopExport() {
|
||||
$("viewanchor").className = "active";
|
||||
$("exportanchor").className = "";
|
||||
|
||||
map.events.unregister("moveend", map, mapMoved);
|
||||
box.handler.clear();
|
||||
map.removeLayer(vectors);
|
||||
}
|
||||
|
||||
function formatChanged() {
|
||||
if ($("format_osm").checked) {
|
||||
$("export_osm").style.display = "inline";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue