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

smartini nabble at stevemartin.org.uk
Fri Feb 19 06:58:39 EST 2010



Christopher Schmidt-2 wrote:
> 
> On Tue, Feb 16, 2010 at 08:56:24AM -0800, smartini wrote:
>> 
>> Christopher,
>> sketchmodified appears to fire constantly while you are drawing and the
>> mouse is moving. I hooked this in to setCenter() for a laugh as the map
>> constantly recentered as I moved the mouse. This event appears to offer a
>> little more than I require.
>> 
>> I console logged all the events just to see if there was anything
>> suitable
>> but alas, there was not, hence my cry for help.
> 
> Makes sense. A quick look at the code doesn't show anything obvious that
> would be better.
> 
> -- Chris
> 

So, would you or anybody else in the community have any suggestions as to
how to go about handling such an event?
I offer as an example a site which manages to accomplish this:
http://www.sanoodi.com/routes/create/   (after registering/logging in)
though I have as yet been unable to reverse engineer the approach used here.

Regards,
Steve

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



More information about the Users mailing list