[OpenLayers-Users] anchor point on circumferance of circle vector

Brad Spencer brad at cubewerx.com.au
Tue Mar 3 19:46:59 EST 2009


List,

 

I have switched from Markers to Vectors for variable sized (attribute
driven) point symbols and this works fine. I want to drag these 'points' and
I also want to see framecloud popups on a mouseover event (hover) at the
same time. I have got this working but by default the framed cloud pointer
is anchored to the circle centre point. This interferes with the dragging
function so I think a solution is to make sure the framedCloud pointer never
enters the variable sized circle vector.

 

I can get the size of a selected vector point circle in my select feature
function but its not clear to me how to use the offset feature when building
the framedCloud popup. 

 

My onSelectFeature code that is triggered in the selectControl is as
follows:

 

function onFeatureSelect(feature) 

{

                // generate the framedCloud popup

                popup = new OpenLayers.Popup.FramedCloud("feature" 

 
,feature.geometry.getBounds().getCenterLonLat()

                                ,null

                                ,"<div style='font-size:9px;
height:auto;'><br/>"+feature.attributes.description+" <br/></div>"

                                ,null       // >>>>>>    if I have pixel
offsets, what goes in here to anchor the framed cloud???

                                ,false

                                ,null);

                feature.popup = popup;

                map.addPopup(popup);

}

 

Cheers,  Brad.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090304/0e27d0b7/attachment.html


More information about the Users mailing list