Hi, I have a vector layer with point features. I'm using a styleMap (see below). I'd like to have 3 different styles: default, select (after the feature has been clicked), "onMouseOver" (something analogue to onMouseOver event, when the user goes over the feature without clicking)
How can I do that? in this example the use the "select" style for onMouseOver event, but there's no selectControl http://openlayers.org/dev/examples/stylemap.html thank you alberto here's my styleMap sostegniStyleOn = new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ 'pointRadius': 10, externalGraphic: 'images/traliccioOff.png', cursor:"pointer" }), "select": new OpenLayers.Style({ 'pointRadius': 10, externalGraphic: 'images/traliccioOn.png', cursor:"pointer" }) //here I need a third style with onMouseOver-like behavior }); here's the layer sostegniGeoJSON = new OpenLayers.Layer.GML("Sostegni", "sostegniGeoJSON.json", { // projection: new OpenLayers.Projection("EPSG:3003"), format: OpenLayers.Format.GeoJSON, styleMap: sostegniStyleOn }); map.addLayer(sostegniGeoJSON); and here's the selectControl selectControl = new OpenLayers.Control.SelectFeature(sostegniGeoJSON, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
