NOTICE: 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.

  <title>OpenLayers Example</title>
    <script src=""></script>
      <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.addControl(new OpenLayers.Control.LayerSwitcher());
       map.setCenter(new OpenLayers.LonLat(0, 0), 1);
       map.addControl(new OpenLayers.Control.PanZoomBar());



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
accept rate: 0%

closed 23 Jul '12, 07:07

EdLoach's gravatar image

EdLoach ♦

The question has been closed for the following reason "Asked and answered at (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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 22 Jul '12, 23:26

question was seen: 5,130 times

last updated: 23 Jul '12, 07:07

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