[OpenLayers-Dev] Mouse Control positioning

bradleyspencer brad at cubewerx.com.au
Thu Mar 1 16:51:31 EST 2007


Christopher,

Thanks for your advice.

The changes you recommend are beyond my ability to mess with and I do not
want to operate off a changed version of OL as I prefer to use the published
version only.

Is there anyway that this could be implemented in an identical way to the
ZoomBar control which works just fine from an application developer way?

I will register a ticket on this?

Cheers,

Brad Spencer
General Manager
CubeWerx Australia Pty Ltd
ABN: 37 115 163 285
Mob: +61 (0)404 841 131
Tel/Fax: +61 (0)2 9481 7024
mailto:brad at cubewerx.com.au
http://www.cubewerx.com.au

-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: Thursday, 1 March 2007 3:17 PM
To: bradleyspencer
Cc: openlayers dev
Subject: Re: [OpenLayers-Dev] Mouse Control positioning

On Thu, Mar 01, 2007 at 03:03:04PM +1100, bradleyspencer wrote:
> Can you help me here? I have implemented a getfeatureinfo listener which
> works just fine.
>
> And in order to not conflict with the zoom and mouse controls, I have been
> able to move the zoom control bar outside the map area which is also fine.
> I used a div and placed control in it this way.
>
> map.addControl(new
> OpenLayers.Control.PanZoomBar({div:$('zoomLevelContainer')}));
>
> But I cannot do the same for the mouse control so I was wondering if this
is
> a bug and if someone could fix it?
>
> So I would like to know precisely how to  move the mouse control outside
the
> map area without having to modify the code.

Assuming you mean the MouseToolbar: You can't. You'll need to change the
code to support putting itself in a seperate div. (Alternatively, after
adding the control to the map, take controlvar.div and detach it,
reattaching it elsewhere in the DOM. If you do that I recommend passing
a position argument to the initializer with an OpenLayers.Pixel(0,0) so
that the control paints itslef in the upper left corner of the div.

Good luck.

Regards,
--
Christopher Schmidt
MetaCarta




More information about the Dev mailing list