Add support to Permalink control to automatically create Permalink inside map div if no element is given. This isn't pretty, but it's a good way to quickly/easily add a permalink to your map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@847 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -34,8 +34,8 @@
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.addControl(new OpenLayers.Control.Permalink());
|
||||
map.addControl(new OpenLayers.Control.Permalink($('permalink')));
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
if (!map.getCenter()) map.zoomToMaxExtent();
|
||||
}
|
||||
// -->
|
||||
@@ -43,7 +43,7 @@
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers Example</h1>
|
||||
<a href="" id="permalink">Permalink</a><br />
|
||||
<a style="float:right" href="" id="permalink">Permalink</a>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user