-<% end %>
-
-<script type="text/javascript">
- <!--
- function startExport() {
- var vectors = new OpenLayers.Layer.Vector("Vector Layer", {
- displayInLayerSwitcher: false,
- });
- map.addLayer(vectors);
-
- var box = new OpenLayers.Control.DrawFeature(vectors, OpenLayers.Handler.RegularPolygon, {
- handlerOptions: {
- keyMask: OpenLayers.Handler.MOD_CTRL,
- sides: 4,
- snapAngle: 90,
- irregular: true,
- persist: true,
- callbacks: { done: boxComplete }
- }
- });
- map.addControl(box);
-
- box.activate();
-
- map.events.register("moveend", map, mapMoved);
- updateRegion(map.getExtent());
- }
-
- function setFormat(format) {
- $("export_osm").style.display = "none";
- $("export_mapnik").style.display = "none";
- $("export_" + format).style.display = "inline";
- }
-
- $("export_format_osm").onclick = function() { setFormat("osm") };
- $("export_format_png").onclick = function() { setFormat("mapnik") };
- $("export_format_pdf").onclick = function() { setFormat("mapnik") };
- $("export_format_svg").onclick = function() { setFormat("mapnik") };
-
- function mapMoved() {
- updateRegion(map.getExtent());
- }