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

Christopher Schmidt crschmidt at metacarta.com
Tue Feb 16 12:05:08 EST 2010


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

> Regs,
> Steve
> 
> 
> Christopher Schmidt-2 wrote:
> > 
> > On Tue, Feb 16, 2010 at 08:47:37AM -0800, smartini wrote:
> >> 
> >> [...]
> >> "sketchstarted", "sketchmodified", "sketchcomplete", "refresh"
> >> 
> >> as the set of supported event types. None of these appear to fire when a
> >> point is plotted.
> > 
> > If you're using the Control.DrawFeature, I'm surprised that sketchmodified
> > doesn't:
> > 
> > Control/DrawFeature.js:75:"sketchmodified", {vertex: vertex, feature:
> > feature}
> > 
> > Did you try that one?
> > 
> > Regards,
> > -- 
> > Christopher Schmidt
> > MetaCarta
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> > 
> > 
> 
> -- 
> View this message in context: http://n2.nabble.com/How-to-recenter-the-map-when-drawing-tp4581070p4581371.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list