[OpenLayers-Trac] Re: [OpenLayers] #3168: FramedCloudPopup has offset

OpenLayers trac-20090302 at openlayers.org
Sat Mar 26 16:25:55 EDT 2011


#3168: FramedCloudPopup has offset
-----------------------+----------------------------------------------------
 Reporter:  pebXX2346  |       Owner:  euzuro      
     Type:  bug        |      Status:  new         
 Priority:  minor      |   Milestone:  2.11 Release
Component:  Popup      |     Version:  2.10        
 Keywords:  position   |       State:              
-----------------------+----------------------------------------------------

Comment(by pebXX2346):

 Replying to [comment:7 jorix]:
 > Replying to [comment:5 pebXX2346]:
 > > Replying to [comment:4 pebXX2346]:

 > Have you tried to create popups with the anchor parameter to null?
 >
 > {{{
 > popup = new
 OpenLayers.Popup.FramedCloud(id,lonlat,size,HTML,null,closeBox);
 > }}}

 I followed other code where the popups are created by:
 {{{
 feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud,
 {'autoSize': true});
 feature.data.popupContentHTML = ...
 ...
 feature.data.icon = makeIcon(icon);
 var marker = feature.createMarker();
 ...
 map.addPopup(feature.createPopup(true));
 }}}
 here one has no chance, but may reset anchor afterward:
 {{{
 feature.popup.anchor={size: new OpenLayers.Size(0,0),offset: new
 OpenLayers.Pixel(0,0)};
 }}}

 ... a bit strange.

 > I understand that this is what you want.

 Yes, result is same as in my code snippet.
 But i thought an anchor as an anchor, a point. Not a stay-out-of-here
 area.


 > Note: I'm not !OpenLayers Team
 I know:-) Me too.

 I found another problem: the transparent areas of the cloud are not
 click transparent, will open a new ticket:-) (here it is: #3192)
 since that behavior is really not transparent for end users.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3168#comment:8>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list