[OpenLayers-Users] How to calculate lat, lon, zoom dynamically from a (.gpx) track?

Jan Martin janmartin3 at googlemail.com
Sat Jun 6 14:45:01 EDT 2009


Hi all,

I am getting more and more frustrated.

After checking out all the examples at http://openlayers.org/dev/examples/
I noticed that in all examples the variables "lat", "lon" and "zoom" are
hard-coded.

However I'd like to load a .gpx file like here:
http://wiki.openstreetmap.org/wiki/Openlayers_Track_example

Then dynamically calculate the "lat", "lon" and "zoom" variables from the
.gpx data, so the map will always just fit.

I mean, websites like http://www.gpsvisualizer.com and
http://utrack.crempa.net handle tracks this way, so why not openlayers?

Thanks,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090606/85a7990c/attachment.html


More information about the Users mailing list