add support for anchor-based permalink, p=sbrunner, r=me (closes #2785)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11170 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-02-21 11:53:08 +00:00
parent 3fce968f2a
commit 7e18475a0b
7 changed files with 220 additions and 14 deletions

View File

@@ -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}));
}