[OpenLayers-Users] Marker and vector mouse over events

pedro hernandez pedrohernandez830 at gmail.com
Tue May 11 03:33:24 EDT 2010


Hi,

 I want to ask two questions:

I have to use one marker layer and I found some examples to “do” something
on mouseover and on mouseout. Something likes that:

var marker = new OpenLayers.Marker(punt,icona);

 marker.events.register("mouseover", foo_var, method2);

 marker.events.register("mouseout", foo_var, method2);



And I also have to use one vector layer, but I only found the SelectFeature
solution to do the same:

selectControl = new OpenLayers.Control.SelectFeature( [layer1,layer2],
{onSelect: onFeatureSelectMethod,onUnselect:onFeatureUnSelectMethod, hover:
true});

map.addControl(selectControl);

selectControl.activate();
But this second way it’s not working so fine as the first one. Is there some
possibility to use mouseover and mouseout events in vector layers?


Another question, not so important, I use  OpenLayers.Request.GET method
calling a php file, but in this one I can’t access to SESSION variable. I’m
doing it right?

OpenLayers.Request.GET({url:'file.php',params: {"lon":
feature.geometry.x,"lat":feature.geometry.y},success:successMethod,scope:feature,failure:function()
{alert('Something wrong happenned’);}});



Thanks a lot!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100511/92d98a30/attachment.html


More information about the Users mailing list