Get latest version: gpx2map rev. 258
If you browse this file locally, please look at the homepage of gpx2map: http://sethdepot.org/gpx2map
gpx2map reads a gps track in GPX format (as produced by e.g. gpsbabel) and writes out an Google or Yahoo Map Mash-up containing the route.
It comes very handy when you e.g. own an Garmin eTrex and want to know where you wandered around last time. Then you just use gpsbabel to fetch your tracks in GPX format and let gpx2map write out an map overlay for you.
HTML Include is put under the GNU General Public License.
gpx2map
Copyright (C) 2007,2008 Robert Lange
robert.lange@s1999.tu-chemnitz.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
First of all Perl itself is needed, but also some packages
from CPAN.
The CPAN-Modules can be found at http://search.cpan.org
For Geo::Distance no pre-packaged version was available at the time of
gpx2map development. Thus, there is an special work-around available: When
Geo::Distance is not found globally, then as a second try it
is searched in the directory cpan/ below the executable.
When you have Geo::Distance installed at your system then you can safely
delete the directory cpan/ in the distribution.
gpx2map is likely to work also with other versions than the one mentioned here. When you encounter problems just drop me a note.
Just copy (or link) the file gpx2map into your path or any place you like.
Put the mash-up template files gpx2map.google.template and and
gpx2map.yahoo.template
where you put gpx2map itself (not to the link, in case you linked it).
When you don't have the CPAN module Geo::Distance installed then
you also need to place the sub-directory cpan/ below
the location you put gpx2map into. See also section Requirements.
Finally, you need to configure gpx2map to use your own Google and/or Yahoo Maps API key, otherwise you won't be able to see your route pages online. See section Configuration.
The input file formal is GPX.
You can get this e.g. by
gpsbabel (gpx2map includes a shortcut for calling
gpsbabel).
gpx2map then reads the GPX file
and writes out
a html page containing either an Yahoo or Google maps mash-up.
An GPX file can contain several tracks. You can select to write out only one specific track, merge all track points together or create one html file for each track.
gpx2map [--help|-h] [--version|-V] [--route|-r route]
[--title|-t title] [--merge] [--yahoo|-y] inputfile
| --help, -h | Help screen |
| --version, -V | Version |
| --yahoo, -y | Create Yahoo Mash-Up |
| --title, -t <title> | Title of web page, when not specified use route name (or leave empty) |
| --route, -r <route> | Route to read |
| --merge | Use all points from all routes in gpx file |
| inputfile | GPX file to read |
Output format is Google maps, unless --yahoo is given.
When neither --route nor --merge are specified,
create individual web pages for each route.
Output is written to
<inputfile_without_suffix>[.<route>].html
For your convenience gpsbabel can be invoked over gpx2map. Just use the following command line:
gpx2map --babel outfile
You can change certain settings of gpx2map operation in the header of the executable. Just search for "global settings".
Most certainly you want to change the Google and/or
Yahoo Maps API keys. They're required when you want to upload the html pages to a
server. Otherwise the API refuses to work.
In the example of Google the key is bound to site, directory and Google Account.
| GPX File | Google Output | Yahoo Output |
|---|---|---|
| ischgl.xml | ischgl-google.html | ischgl-yahoo.html |
| juh.xml | juh-google.html | juh-yahoo.html |
| italy_hiking.xml | Monte Baldo Vesio Brenta Dolomites |
The browser compatibility should be improved.
gpx2map generated pages are tested sucessfully with Firefox 2.0,
with most other (older) browsers you can expect drawbacks.
Secondly the pages created for Yahoo Maps lack a correct document type declaration. It's not fixed yet because when I put a document type then the map element does not resizes anymore to browser window size. I did not found the reason for this behaviour yet.
When you can contribute to improve compatibility you're warmly welcome to enhance the templates. Just contact me.
The author is Robert Lange <robert.lange@s1999.tu-chemnitz.de>
If you have any questions, just write me.
The home page of gpx2map is http://sethdepot.org/gpx2map.
Please look there for new versions.
I specially thank Mike Schill, who presented in the german linux magazine how to use GPS data as route overlay in Yahoo.
Kudos goes also to gpsbabel for providing an simple interface to my Garmin eTrex.
And of course my thanks are going to everybody behind Perl, CPAN, Linux and free software in general.
| created by rola |
|
last modification: 2008-01-10 $LastChangedRevision: 267 $
$LastChangedDate: 2008-01-20 01:15:42 +0100 (Sun, 20 Jan 2008) $ |