[OpenLayers-Dev] drawing parallel lines

Ivan Grcic igrcic at gmail.com
Mon Feb 23 08:36:45 EST 2009


Hi,
take a look at projection proj4js library and how to use it (its
integrated in openlayers)
Then you can take your Geographic coords and proj them to UTM, and do
things like u did before...

http://trac.osgeo.org/proj4js/wiki/UserGuide
http://trac.openlayers.org/wiki/Documentation/Dev/proj4js

Cheers!


2009/2/22 toni hernández <tonidelacalle at gmail.com>:
> hi,
>
> In the application I am working on, I need to draw a parallel line to a
> previously selected linestring.
> The parallel line has to be at a distance "d" in METERS.
> So far the map where the lines are drawn was in UTM coordinates so I had no
> problem to do that because there is a direct relation between UTM
> coordinates and metric units. Just some algebra (sin, cos..) and Pythagoras
> and I had the parallel line at a distance "d" (METERS).
> Now the map is in Geographic coordinates and I am really confused. I do not
> know how to do the parallel lines any more because I think I can not mix
> meters with degrees.
>
> any ideas?
> thanks for just reading it.
>
>
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>
>



-- 
Ivan Grcic



More information about the Dev mailing list