Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have this code and some of the time,(not always!!), i have a dialogue that get

displayed in the middle of the map:

Google Maps

Map data (c)2012 Google

   var map;
   var vectors;
   var epsg900913 = new OpenLayers.Projection('EPSG:900913');
   var epsg4326 = new OpenLayers.Projection('EPSG:4326');


   function initialize() {
       var control, renderer=OpenLayers.Util.getParameters(window.location.href).renderer;
       renderer= (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
       // Create the map object
       map = new OpenLayers.Map('map');
        //Create a Google layer
       var gmap = new OpenLayers.Layer.Google(
           "Google Streets", // the default
             {numZoomLevels: 20}
       );
       var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});


       vectors= new OpenLayers.Layer.Vector(
          "Vector Layer",
           {
               renderers:renderer
           }
       );

       map.addLayers([gmap,vectors]);

       map.addControl(new OpenLayers.Control.LayerSwitcher());
       map.addControl(new OpenLayers.Control.MousePosition());

       control=new OpenLayers.Control.DrawFeature(vectors,OpenLayers.Handler.Path);
       map.addControl(control);
       control.activate();
       // Zoom to Vancouver, BC
       map.setCenter(new OpenLayers.LonLat(-123.12, 49.28).transform(epsg4326, epsg900913), 13);         
  }

Does anyone know where is this coming from?

Thanks in advance.

share|improve this question
    
See gis.stackexchange.com/questions/20604/… and my answer there. –  erilem May 27 '12 at 12:11
add comment

1 Answer

It's the same behaviour as reported here: How to close watermarks window in QGIS Openlayers plugin?

It's reported here: http://trac.osgeo.org/openlayers/ticket/2984

and solved here: https://github.com/openlayers/openlayers/commit/92f04a7a4277a6c818ef2d40a2856910ed72d3d6

So, either try the nightly build of openLayers, wait for next release, or apply the patch yourself.

share|improve this answer
    
thanks very much –  jenia May 23 '12 at 15:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.