summaryrefslogtreecommitdiff
path: root/misc/openlayers/examples/anchor-permalink.js
blob: 1ad29392ac3deed35e1b9ad0453b5da1524165bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}));
}