vPedestrian = new OpenLayers.Layer.Vector("Pedestrians", {displayInLayerSwitcher: true});
vPedestrian.styleMap = new OpenLayers.StyleMap({'default': new OpenLayers.Style({}, { rules: [ new OpenLayers.Rule({ symbolizer: { "Point":{ 'pointRadius': 15, 'externalGraphic': 'include/img/Pedestrian.gif' } } })] }) }); Heron.options.map.layers.push(vPedestrian); return false;}function AddPedestrian(lat, lon){ var fv = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lon,lat)); vPedestrian.addFeatures(fv);}I call AddPedestrian function to display a Point on the map. However, I would like to display the feature for only 1 min. I tried using setTimeout with removeFeatures, but then the image is never displayed. Can anyone please help? Thanks!
أكثر...
vPedestrian.styleMap = new OpenLayers.StyleMap({'default': new OpenLayers.Style({}, { rules: [ new OpenLayers.Rule({ symbolizer: { "Point":{ 'pointRadius': 15, 'externalGraphic': 'include/img/Pedestrian.gif' } } })] }) }); Heron.options.map.layers.push(vPedestrian); return false;}function AddPedestrian(lat, lon){ var fv = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(lon,lat)); vPedestrian.addFeatures(fv);}I call AddPedestrian function to display a Point on the map. However, I would like to display the feature for only 1 min. I tried using setTimeout with removeFeatures, but then the image is never displayed. Can anyone please help? Thanks!
أكثر...