summaryrefslogtreecommitdiff
path: root/misc/openlayers/examples/anchor-permalink.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/openlayers/examples/anchor-permalink.js')
-rw-r--r--misc/openlayers/examples/anchor-permalink.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/misc/openlayers/examples/anchor-permalink.js b/misc/openlayers/examples/anchor-permalink.js
new file mode 100644
index 0000000..1ad2939
--- /dev/null
+++ b/misc/openlayers/examples/anchor-permalink.js
@@ -0,0 +1,13 @@
+function init() {
+ var map = new OpenLayers.Map({
+ div: "map",
+ projection: new OpenLayers.Projection("EPSG:900913"),
+ displayProjection: new OpenLayers.Projection("EPSG:4326"),
+ layers: [
+ new OpenLayers.Layer.OSM()
+ ]
+ });
+ if (!map.getCenter()) map.zoomToMaxExtent();
+
+ map.addControl(new OpenLayers.Control.Permalink({anchor: true}));
+}