[OpenLayers-Users] simulate marker click in javascript function?

Christopher Schmidt crschmidt at metacarta.com
Tue Jun 26 18:06:45 EDT 2007


On Tue, Jun 26, 2007 at 02:22:05PM -0800, Jennifer Strahan wrote:
> Hello,
> 
> I'd like to create a javascript function that zooms to a marker (GeoRSS 
> layer) and automatically opens the corresponding popup when a user 
> selects a marker from a drop down menu.  I've figured out how to zoom to 
> the selected marker, but am having trouble figuring out how I can open 
> up the popup window.  Does anyone have any suggestions of how I might do 
> this?  If I pass the lat/lon of the marker location, is there a function 
> I can call that will simulate a marker click at that location?


layer.markers[0].events.triggerEvent('click', {});

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list