[OpenLayers-Users] strange behavior with wrong click event
coordinates and drag pan
Puneet Kishor
punk.kish at gmail.com
Mon Jan 9 15:02:07 EST 2012
On Jan 7, 2012, at 3:26 AM, Andreas Hocevar wrote:
> Don't remove the Navigation control, and everything will be fine.
>
>
Thanks Andreas. That was it. All is fine now.
>
> On Fri, Jan 6, 2012 at 11:53 PM, Puneet Kishor <punk.kish at gmail.com> wrote:
>> 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,
>>
More information about the Users
mailing list