summaryrefslogtreecommitdiff
path: root/misc/openlayers/examples/donut.js
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2015-10-17 21:36:38 +0200
committerChris Schlaeger <chris@linux.com>2015-10-17 21:36:38 +0200
commite30f267181d990947e67909de4809fa941698c85 (patch)
tree46e9f94c2b3699ed378963b420b8a8d361286ea1 /misc/openlayers/examples/donut.js
parente763ceb183f389fcd314a4a6a712d87c9d4cdb32 (diff)
downloadpostrunner-e30f267181d990947e67909de4809fa941698c85.zip
Upgrading openlayers to 3.x
Diffstat (limited to 'misc/openlayers/examples/donut.js')
-rw-r--r--misc/openlayers/examples/donut.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/misc/openlayers/examples/donut.js b/misc/openlayers/examples/donut.js
deleted file mode 100644
index 067be62..0000000
--- a/misc/openlayers/examples/donut.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// allow testing of specific renderers via "?renderer=Canvas", etc
-var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
-renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
-
-var map = new OpenLayers.Map({
- div: "map",
- layers: [
- new OpenLayers.Layer.OSM(),
- new OpenLayers.Layer.Vector("Vector Layer", {
- renderers: renderer
- })
- ],
- center: new OpenLayers.LonLat(0, 0),
- zoom: 1
-});
-
-var draw = new OpenLayers.Control.DrawFeature(
- map.layers[1],
- OpenLayers.Handler.Polygon,
- {handlerOptions: {holeModifier: "altKey"}}
-);
-map.addControl(draw);
-
-// optionally listen for sketch events on the layer
-var output = document.getElementById("output");
-function updateOutput(event) {
- window.setTimeout(function() {
- output.innerHTML = event.type + " " + event.feature.id;
- }, 100);
-}
-map.layers[1].events.on({
- sketchmodified: updateOutput,
- sketchcomplete: updateOutput
-});
-
-// add behavior to UI elements
-function toggleControl(element) {
- if (element.value === "polygon" && element.checked) {
- draw.activate();
- } else {
- draw.deactivate();
- }
-}
-document.getElementById("noneToggle").checked = true;