Is it possible to delete a vector layer when a user pans or zooms a map? I saw in the documentation that there is a function called onMapResize. Can this also be used to detect a pan change?
I want to delete a point if the map is panned or zoomed and tried using it in the following way (which does not work):
map.OpenLayers.vectorLayer.onMapResize(console.log('map was moved'))
//use removeAllFeatures() to remove vector points
