Mouse Control positioning

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mouse Control positioning

ezigoing

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.

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
[hidden email]
http://www.cubewerx.com.au

 

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Mouse Control positioning

Christopher Schmidt-2
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
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Mouse Control positioning

ezigoing
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:[hidden email]
http://www.cubewerx.com.au

-----Original Message-----
From: Christopher Schmidt [mailto:[hidden email]]
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

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Mouse Control positioning

Christopher Schmidt-2
On Fri, Mar 02, 2007 at 08:51:31AM +1100, bradleyspencer wrote:

> 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?

Yes. This is a deficiency in the MouseToolbar control. I'd call that an
enhancement request, and I'd welcome a ticket for it.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

PNG Transparency on IE 6

Antonio-41
In reply to this post by ezigoing
Hy ,
I am using OL on a my application.I have many PNG transparent
overlapping layers on the same map generated by my mapserver.
All works fine with the Firefox,Safari,IE7 but doesn't work with IE6 for
a its bug ( *PNG Transparency* in Internet Explorer
<http://www.pcmag.com/article2/0,1759,1645331,00.asp>)
Do you know if OL take care of this bug in its code or what could I do
for that?

Thanks

Antonio Volpicelli

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: PNG Transparency on IE 6

Steven Ottens
Hi antonio,

There is a solution; the FixPNG workaround, but it's slow. This is  
not a big problem if you have 3 PNG images, but if you enable tiling,  
you easily get up to 30 images and it takes up to minutes to draw the  
layers. Also with this workaround the images are not displayed until  
all the images are loaded and fixed. Which gives your application a  
very sluggish feel to it.
More info at: http://homepage.ntlworld.com/bobosola/pngtestfixed.htm
I don't know if OL supports the fixpng workaround, nor do I know they  
want to. The solution I use is GIF and opacity on the layers for IE.  
It's not as good as transparent PNG, but it's workable.

Steven

On Mar 2, 2007, at 10:05 AM, Antonio Volpicelli wrote:

> Hy ,
> I am using OL on a my application.I have many PNG transparent
> overlapping layers on the same map generated by my mapserver.
> All works fine with the Firefox,Safari,IE7 but doesn't work with  
> IE6 for
> a its bug ( *PNG Transparency* in Internet Explorer
> <http://www.pcmag.com/article2/0,1759,1645331,00.asp>)
> Do you know if OL take care of this bug in its code or what could I do
> for that?
>
> Thanks
>
> Antonio Volpicelli
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: PNG Transparency on IE 6

Christopher Schmidt-2
On Fri, Mar 02, 2007 at 10:29:57AM +0100, Steven M. Ottens wrote:
> Hi antonio,
>
> There is a solution; the FixPNG workaround, but it's slow. This is  
> not a big problem if you have 3 PNG images, but if you enable tiling,  
> you easily get up to 30 images and it takes up to minutes to draw the  
> layers. Also with this workaround the images are not displayed until  
> all the images are loaded and fixed. Which gives your application a  
> very sluggish feel to it.

Indeed, we used to have this on by default, but turned it off when we
realized that it basically made applications unusable.

The way to enable this is to add an 'alpha':true option to your layer
options:

 new OpenLayers.Layer.WMS("Name", "url", {'params':'here'},
 {'alpha':true});

But you should be aware that this is likely to cause serious slowdowns
in IE6, and should be tested before deployment.

I recommend using GIF (or 8bit PNGs) for your overlays in IE6.  

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: PNG Transparency on IE 6

Antonio-41
Thanks Chris and Steven,
I have switched to GIF and works fine now , but I am curious  to  test  
the 'alpha':true option too just  to see how  much it  slowdown.

Thanks

Ciao
Antonio

Christopher Schmidt wrote:

> On Fri, Mar 02, 2007 at 10:29:57AM +0100, Steven M. Ottens wrote:
>  
>> Hi antonio,
>>
>> There is a solution; the FixPNG workaround, but it's slow. This is  
>> not a big problem if you have 3 PNG images, but if you enable tiling,  
>> you easily get up to 30 images and it takes up to minutes to draw the  
>> layers. Also with this workaround the images are not displayed until  
>> all the images are loaded and fixed. Which gives your application a  
>> very sluggish feel to it.
>>    
>
> Indeed, we used to have this on by default, but turned it off when we
> realized that it basically made applications unusable.
>
> The way to enable this is to add an 'alpha':true option to your layer
> options:
>
>  new OpenLayers.Layer.WMS("Name", "url", {'params':'here'},
>  {'alpha':true});
>
> But you should be aware that this is likely to cause serious slowdowns
> in IE6, and should be tested before deployment.
>
> I recommend using GIF (or 8bit PNGs) for your overlays in IE6.  
>
> Regards,
>  

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev