Removing Info bubbles

3 messages Options
Embed this post
Permalink
subash_ks

Removing Info bubbles

Reply Threaded More More options
Print post
Permalink
Hi All, I have an openlayer map with several markers.By clicking on the markers its showing info bubbles.But i need only one info bubble at a time.That means by clicking on the info bubble i have to remove older info bubbles,i need only the newely clicked one.Is it possible ?I am using mapstraction library also. Thanks and Regards, Subash K S
hauxon

Re: Removing Info bubbles

Reply Threaded More More options
Print post
Permalink

subash_ks wrote:
Hi All,
        I have an openlayer map with several markers.By clicking on the markers its showing info bubbles.But i need only one info bubble at a time.That means by clicking on the info bubble i have to remove older info bubbles,i need only the newely clicked one.Is it possible ?I am using mapstraction library also.

Thanks and Regards,
                              Subash K S
Are you using OpenLayers.Popup?

If using Popup you can roll through the popups layer

        for(i=0;map.popups.length;i++)
        {
                map.removePopup(map.popups[i])
        }

I tend to delete the popup layer and create again each time to avoid redraw errors.

Good luck!
Hrannar
Niklas Ringdahl

Re: Removing Info bubbles

Reply Threaded More More options
Print post
Permalink
In reply to this post by subash_ks
Some javascript/style in this post has been disabled (why?)
If you are using the addPopup method of the OpenLayers.Map object, you can specify this in the function call. Then OpenLayers will handle this automagically.
 

addPopup

addPopup: function( popup,
exclusive )

Parameters

popup {OpenLayers.Popup}
exclusive {Boolean} If true, closes all other popups first
 
 
 
- Niklas
 


Från: [hidden email] [mailto:[hidden email]] För subash_ks
Skickat: den 20 oktober 2009 09:09
Till: [hidden email]
Ämne: [OpenLayers-Dev] Removing Info bubbles

Hi All, I have an openlayer map with several markers.By clicking on the markers its showing info bubbles.But i need only one info bubble at a time.That means by clicking on the info bubble i have to remove older info bubbles,i need only the newely clicked one.Is it possible ?I am using mapstraction library also. Thanks and Regards, Subash K S

View this message in context: Removing Info bubbles
Sent from the OpenLayers Dev mailing list archive at Nabble.com.

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev