[OpenLayers-Users] How to recenter the map when drawing

smartini nabble at stevemartin.org.uk
Tue Feb 16 11:47:37 EST 2010


Hi Stephen.
I am aware of what method I need to call on the map in order to center it.
The problem is that I don't yet know how to intercept the event that occurs
when a point is plotted such that I can then call: map.setCenter(evt.xy);
[for instance]

Layer/Vector.js defines:
beforefeatureadded", "beforefeaturesadded", "featureadded", "featuresadded",
"beforefeatureremoved",   "featuresremoved", "beforefeatureselected",
"featureselected", "featureunselected",  "beforefeaturemodified",
"featuremodified", "afterfeaturemodified", "vertexmodified",
"sketchstarted", "sketchmodified", "sketchcomplete", "refresh"

as the set of supported event types. None of these appear to fire when a
point is plotted.

Cheers,
Steve
-- 
View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581324.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list