[OpenLayers-Users]
Re: mouseover, mouseout events for getting popups
sjonnala
sj3670 at att.com
Fri Aug 5 18:20:15 EDT 2011
Hi Bernhard,
thanks for the reply. Your suggestion seems to be useful. But before
seeing your reply, I was able to create the mouseover, mouseout
functionalities. What i did was below:
* mouseOver: function(evt) {
for(var i=0; i < ti_Markers.map.popups.length; i++) {
ti_Markers.map.removePopup(ti_Markers.map.popups[i]);
}
var anchor=(this.marker)?this.marker.icon:null;
popup = new
OpenLayers.Popup.Anchored("olPopupOver",this.data.latlon,null,this.data.popupContentHTML.substring(39,47),anchor,true)
ti_Markers.map.addPopup(popup);
OpenLayers.Event.stop(evt);
},
mouseOut: function(evt) {
for(var i=0; i < ti_Markers.map.popups.length; i++) {
ti_Markers.map.removePopup(ti_Markers.map.popups[i]);
}
}
*
Here for id='olPopupOver', I'm creating a seperate function to insert
ContentHtml. This is working fine except for the click. The click event
happens immediately followed by mouseout clearing all the data on the layer.
I need to fix this. Once i'm done i'll post that here.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/mouseover-mouseout-events-for-getting-popups-tp6657567p6658268.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list