I am seeing one weird thing in Openlayers today. I am unable to see whole map by using panzoombar, previously i used too.
<html>
<head>
<title>OpenLayers Example</title>
<script src="http://openlayers.org/api/OpenLayers.js"></script>
</head>
<body>
<div style="width:100%; height:100%" id="map"></div>
<script defer="defer" type="text/javascript">
var Geographic = new OpenLayers.Projection("EPSG:4326");
var Mercator = new OpenLayers.Projection("EPSG:900913");
var map = new OpenLayers.Map({
div: "map",
projection: Mercator,
displayProjection: Geographic,
center: new OpenLayers.LonLat(0, 0),
minResolution: "auto",
minExtent: new OpenLayers.Bounds(-1, -1, 1, 1),
maxResolution: "auto",
maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90),
units : 'km'
});
var layerOSM = new OpenLayers.Layer.OSM();
map.addLayer(layerOSM);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(0, 0), 1);
map.addControl(new OpenLayers.Control.PanZoomBar());
</script>
</body>
</html>
this is the code, panzoombar is showing all the levels, but it stopped at last above two levels and not coming down.
asked
22 Jul '12, 23:26
Ramesh Kotha
11●1●1●2
accept rate:
0%