[OpenLayers-Dev] snapping

Jachym Cepicky jachym.cepicky at gmail.com
Fri Jan 9 05:34:23 EST 2009


Hi,

it looks great, but will there be any "beforeSnap" method, which could
be customised by the user?

/**
 * Method: beforeSnap
 * Customizing the resulting coordinates
 *
 * Parameters:
 * point - {<OpenLayers.Point>}
 * snapped - {Boolean} the point was already snapped to some object
 *
 * Returns:
 * {Point} - resulting point
 */
beforeSnap: function(point,snapped) {
        // custom snapping, e.g. server-side correction
        // ...
        return point;
},

Thanks

Jachym


2009/1/9 Tim Schaub <tschaub at opengeo.org>:
> Hey-
>
> I done some work to create a snapping agent for vector editing [1].
> This extends (in spirit) the work started by jachym and continued by
> fredj [2].  The snapping agent is implemented as a single control that
> listens for vector layer events.
>
> This included a number of enhancements to the geometry classes and
> sketch handlers.  One particularly nice addition (in my opinion) is
> geometry.distanceTo for all geometry types.  I'll tease out this change
> and others to create specific tickets.
>
> If others are interested in snapping, see the wiki page for more details
> [3].  Add any comments if there are additional bits of functionality
> that should be considered.
>
> Tim
>
> [1] http://dev.openlayers.org/sandbox/topp/editing/examples/snapping.html
> [2] http://trac.openlayers.org/ticket/954
> [3] http://trac.openlayers.org/wiki/Proposal/Snapping
>
> --
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp



More information about the Dev mailing list