Hi Adolfo,
I think using an animated gif to implement this is a good idea. And you even don’t need to write a new point style. You can add a marker overlay to the map control at the beginning, and then check if the new marker is in the range of the areas, if so just change the icon of the specific marker to the gif icon. Following is some code in the client side:
function AddMarker() {
// Add a marker to the specific marker overlay
if (markerOverlay && markerOverlay.markers.length == 0) {
var iconPath = "Images/Sedan.png";
var lonlat = new OpenLayers.LonLat(0, 0);
var size = new OpenLayers.Size(48, 48);
var offset = new OpenLayers.Pixel(-16, -16);
var icon = new OpenLayers.Icon(iconPath, size, offset);
var marker = new OpenLayers.Marker(lonlat, icon);
markerOverlay.addMarker(marker);
}
}
function ChangeMarkerImage() {
// Change the icon of the specific marker.
if (markerOverlay && markerOverlay.markers.length == 1) {
markerOverlay.markers[0].setUrl('Images/AlertingSedan.gif');
}
}
Any more questions please let me know.
Thanks,
Sun