NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%20Kotha's gravatar image

Ramesh Kotha
11112
accept rate: 0%

closed 23 Jul '12, 07:07

EdLoach's gravatar image

EdLoach ♦
19.5k16156280

The question has been closed for the following reason "Asked and answered at http://gis.stackexchange.com/questions/29407/unable-to-see-whole-world-map-by-decreasing-panzoom-bar (Openlayers v2.12 feature - try older openlayers)" by EdLoach 23 Jul '12, 07:07

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362
×122

question asked: 22 Jul '12, 23:26

question was seen: 5,239 times

last updated: 23 Jul '12, 07:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum