[OpenLayers-Users] triggering a featureselected event?

Christopher Schmidt crschmidt at metacarta.com
Tue Apr 28 11:27:46 EDT 2009


On Tue, Apr 28, 2009 at 11:20:42AM -0400, Chris Abraham wrote:
> Hi,
> I'm trying to make links on a page open the popups on features on a  
> map.  I'm trying to accomplish this by triggering a featureselected  
> event on the feature but I'm not sure how to do this.  I have a  
> reference to the feature in my code.  Does anyone know how to trigger  
> the event?

I'm assuming you know that the featureselected event doesn't do anything
by itself... If you look at the code in:

 http://docs.openlayers.org/library/overlays.html#displaying-popups

Although it is based around selection/unselection, you can ignore the
'evt', since you have the 'feature', that you need, and just take the
onFeatureSelect code and use it directly... 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list