<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Andreas,
<br>
<br>
Thank you for the response.<br>
Actually, i am able to set default and select style for my data. <br>
So, by default it gives image-1 and on select it shows with image-2. But inbetween i want to specify another style on hover/mouseover. At this point i am stuck-up.
<br>
<br>
My code goes as follows--<br>
<br>
//MARINA HARBOUR LAYER<br>
var mh_style_def = new OpenLayers.Style({'externalGraphic': "http://localhost/openlayers/img/mh.png",
<br>
'graphicHeight': 25,<br>
'graphicWidth': 21,<br>
'graphicXOffset': -10.5,<br>
'graphicYOffset': -12.5<br>
}); <br>
var mh_style_sel = new OpenLayers.Style({'externalGraphic': "http://localhost/openlayers/img/mh_sel.png",
<br>
'graphicHeight': 25,<br>
'graphicWidth': 21,<br>
'graphicXOffset': -10.5,<br>
'graphicYOffset': -12.5
<br>
});<br>
var mh_style_tmp = new OpenLayers.Style({'externalGraphic': "http://localhost/openlayers/img/mh_tmp.png",
<br>
'graphicHeight': 25,<br>
'graphicWidth': 21,<br>
'graphicXOffset': -10.5,<br>
'graphicYOffset': -12.5 <br>
});<br>
<br>
var mh_styleMap = new OpenLayers.StyleMap({'default':mh_style_def, 'temporary': mh_style_tmp, 'select': mh_style_sel});<br>
<br>
var mhlayer = new OpenLayers.Layer.Vector("mh", {styleMap: mh_styleMap,<br>
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],<br>
protocol: mh_protocol
<br>
});<br>
<br>
map.addLayer(mhlayer);<br>
<br>
<br>
//Hover Control<br>
hovercontrol = new OpenLayers.Control.GetFeature({ <br>
protocol: mh_protocol, <br>
box: true,<br>
hover: true,<br>
multipleKey: "shiftKey",<br>
toggleKey: "ctrlKey" <br>
}); <br>
hovercontrol.events.register("hoverfeature", this, function(e) {<br>
<span style="color: rgb(255, 0, 0);">here i want to add a code to specify the new style .And i am not able to
</span> <br>
}); <br>
<br>
<div>When i say "hover:true" does the openlayers take temporary option in style map or do i need to register event?<br>
<br>
<div style="font-family: Tahoma; font-size: 13px;">With Regards,<br>
Neelima Emmani<br>
</div>
</div>
</div>
</body>
</html>