[OpenLayers-Dev] Re: Features move around when map panned

Phil Scadden p.scadden at gns.cri.nz
Tue Jun 14 17:44:46 EDT 2011


> options = {
> 	displayProjection: new OpenLayers.Projection("EPSG:4326"),
> 	projection: "EPSG:900913",
> 	maxExtent: new OpenLayers.Bounds(-180,-90,180,90),
> 	numZoomLevels: 9,
> 	eventListeners: {
>              "zoomend": kmlEvent,
>              "moveend": kmlEvent
>          }
>   }
In my experience, your maxExtent is not going to work. Try
  new OpenLayers.Bounds(-20037508.34, -20037508.34,
                                      20037508.34, 20037508.34);
-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Dev mailing list