[OpenLayers-Users] Displaying tooltip over WMS points + considering using Ext

Phil Scadden p.scadden at gns.cri.nz
Sun Mar 24 14:05:07 PDT 2013


> I am using WMS layer in my application and I need to display tooltip over my
> points. I want to use Extjs (Ext.ToolTip) but I am not sure how to get the
> right position of the tooltip. I see that there is showAt(x,y) method but
> don't know how to get x,y of each point. also I though of use the courser
> location but can't figure out how to do it exactly.
Its somewhat frustrating. You will be showing the tooltip in the context 
of a event (onhover etc), and the basic info you want is in
event.xy. This is xy location with respect to map. You set tooltip 
location with tooltip.targetXY but this is absolute location so you have 
to add offsets for map position with respect to other elements in your 
design (eg toolbars, headers etc).

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 Users mailing list