[OpenLayers-Users] Re: strange behavior with wrong click event
coordinates and drag pan
Puneet Kishor
punk.kish at gmail.com
Fri Jan 6 17:53:36 EST 2012
The following behavior still continues...
On Jan 6, 2012, at 10:50 AM, Puneet Kishor wrote:
>
> var map = new OpenLayers.Map("map", {
> "controls": [
> - new OpenLayers.Control.LayerSwitcher(),
> - new OpenLayers.Control.Navigation(),
> - new OpenLayers.Control.PanZoom(),
> + new OpenLayers.Control.LayerSwitcher({
> + "roundedCornerColor": "rgba(0,0,0,0.8)"
> + }),
> + new OpenLayers.Control.ZoomPanel(),
> new OpenLayers.Control.MousePosition({
> "div": document.getElementById("coords"),
> "numDigits": 2
> })
> ],
> "projection": new OpenLayers.Projection("EPSG:900913"),
> "displayProjection": new OpenLayers.Projection("EPSG:4326"),
> "units": "m",
> "maxResolution": 156543.0339,
> "maxExtent": new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508)
> });
> ...
>
> 2. I am unable to drag and pan the map. On the other hand, if I bring back Control.Navigation and Control.PanZoom then I am able to drag pan the map. I want to be able to drag pan the map, but I don't want to show the PanZoom controls. How can I achieve that?
I can simply not drag the map around. I want to be able to drag the map without showing the pan controls on the top left. How can I do that?
Many tia,
--
Puneet Kishor
More information about the Users
mailing list