[OpenLayers-Users] Externally toggle a marker's popup
Alan Boudreault
aboudreault at mapgears.com
Mon Jun 16 09:50:07 EDT 2008
Hi Alex,
If i assume that your popup is displayed when you click on your marker,
marker.events.register("mousedown", feature, markerClick);
you could keep an global array of all your features and do the same
thing that in your markerClick function. ( aFeatures[i].popup.toggle(); )
Alan
aschwartz wrote:
>
> Alan Boudreault wrote:
>
>> create a JS function to toggle this marker easily by setting
>> something like: href="javascript:toggleMyMarker();"
>>
>>
>
> Hi Alan,
>
> I understand what I need to get done, like to keep track of the markers in
> an array, and access them and tell them to toggle their popup, but I just
> cannot figure out how to call that popup's toggle() method. I have put the
> code up here (http://solidworks.pastebin.com/f76b5d6ed) .
>
> You can see line 67 calls addmarkers() on body load. Also line 135 is where
> the link to the person is created in that while loop, for each positive
> search result. I already have it calling a method in that tag using
> javascript, "javascript:popupOnClick()" , but am not sure what to put in
> that method to properly drill down to the level of being able to call
> toggle. Any help would be appreciated.
>
> -Alex
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com
More information about the Users
mailing list