[OpenLayers-Users] Popup over point feature with hover:true
Indika Tantrigoda
indika85 at gmail.com
Fri Oct 31 12:28:39 EDT 2008
Hi Alexandre,
I remember seeing something like this on one of sites in the OpenLayers
gallery.(http://mapdata.thehumanjourney.net/)
Maybe you could offset the popup slightly to either direction by using
var more=lonlat.add(0.003,0.003);
var less=lonlat.add(-0.003,-0.003);
less.lon, less.lat, more.lon, more.lat
I haven't tried this out myself. Hope this helps you.
Indika
2008/10/31 Alexandre Dube <adube at mapgears.com>
> Hi list,
>
> I have WFS layer of points with a select control to open popups when
> the mouse is over a feature ( hover:true ).
>
> Problem is : the popup div covers half of the feature and if I get the
> mouse near that area, the popup keeps disappearing and reappearing (
> like a glitch). That's because of the position of the popup ( center of
> the feature) given by the feature.geometry.getBounds().getCenterLonLat()
> functions, which returns the only point available ( point layer ).
>
> popup = new OpenLayers.Popup.FramedCloud(
> "chicken",
> feature.geometry.getBounds().getCenterLonLat(),
> null,
> szHTML,
> null, true, onPopupClose);
>
> So, how could I "offset" the popup a little to make it outside the
> point radius ? I also use a custom pointRadius also btw...
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081031/d3618856/attachment.html
More information about the Users
mailing list