peplin / gpxviewer Goto Github PK
View Code? Open in Web Editor NEWJavascript GPX file viewer using Google Maps, updated for API v3
Home Page: http://code.google.com/p/gpxviewer/
Javascript GPX file viewer using Google Maps, updated for API v3
Home Page: http://code.google.com/p/gpxviewer/
Thanks for a great script. It works really well. But it doesn't draw tracks on the map on Mac OS, using Safari, Chrome or Firefox. Perhaps there is a problem with my gpx file?
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" creator="AvPlan" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">
<metadata> <link href="http://www.avsoft.com.au">
<text>AvSoft</text>
</link><time>2016-04-12T22:52:08Z</time>
</metadata><wpt lon="130.975556" lat="-25.186111">
<ele>1626</ele>
<name>YAYE</name>
<desc>AYERS ROCK</desc>
<type>AD</type>
</wpt>
<wpt lon="130.968149" lat="-25.335986">
<ele>0</ele>
<name>2520.159S13058.089E</name>
<desc>2520.159S13058.089E</desc>
<type>U</type>
</wpt>
<wpt lon="131.087441" lat="-25.296806">
<ele>0</ele>
<name>2517.808S1315.246E</name>
<desc>2517.808S1315.246E</desc>
<type>U</type>
</wpt>
<wpt lon="130.968149" lat="-25.335986">
<ele>0</ele>
<name>2520.159S13058.089E</name>
<desc>2520.159S13058.089E</desc>
<type>U</type>
</wpt>
<wpt lon="130.786428" lat="-25.272357">
<ele>0</ele>
<name>2516.341S13047.186E</name>
<desc>2516.341S13047.186E</desc>
<type>U</type>
</wpt>
<wpt lon="130.710479" lat="-25.268761">
<ele>0</ele>
<name>2516.126S13042.629E</name>
<desc>2516.126S13042.629E</desc>
<type>U</type>
</wpt>
<wpt lon="130.707696" lat="-25.352517">
<ele>0</ele>
<name>2521.151S13042.462E</name>
<desc>2521.151S13042.462E</desc>
<type>U</type>
</wpt>
<wpt lon="130.710479" lat="-25.268761">
<ele>0</ele>
<name>2516.126S13042.629E</name>
<desc>2516.126S13042.629E</desc>
<type>U</type>
</wpt>
<wpt lon="130.786428" lat="-25.272357">
<ele>0</ele>
<name>2516.341S13047.186E</name>
<desc>2516.341S13047.186E</desc>
<type>U</type>
</wpt>
<wpt lon="130.975556" lat="-25.186111">
<ele>1626</ele>
<name>YAYE</name>
<desc>AYERS ROCK</desc>
<type>AD</type>
</wpt>
<wpt lon="132.324317" lat="-24.647583">
<ele>1824</ele>
<name>Y0OU</name>
<desc>WALLARA RANCH STATION</desc>
<type>ALA</type>
</wpt>
<wpt lon="133.408333" lat="-24.016667">
<ele>0</ele>
<name>LWG</name>
<desc>LAWRENCE GORGE</desc>
<type>VFA</type>
</wpt>
<wpt lon="133.900833" lat="-23.808333">
<ele>1789</ele>
<name>YBAS</name>
<desc>ALICE SPRINGS</desc>
<type>AD</type>
</wpt>
<rte>
..and it goes on...
hello
the lib does not seem to support rte / rtept nodes
or is there a problem with my file?
<?xml version="1.0" encoding="utf-8"?>
<gpx version="1.1" creator="Movescount - http://www.movescount.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.cluetrust.com/XML/GPXDATA/1/0 http://www.cluetrust.com/Schemas/gpxdata10.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns="http://www.topografix.com/GPX/1/1">
<rte>
<name>Test</name>
<rtept lat="47.080059" lon="15.401038">
<ele>344</ele>
</rtept>
<rtept lat="47.08006" lon="15.400902">
<ele>344</ele>
</rtept>
<rtept lat="47.080074" lon="15.400745">
<ele>344</ele>
</rtept>
...
</rte>
</gpx>
thanks,
regards
Just an FYI -- I needed a bit of extra functionality, specifically the ability to see the time/elevation at any point along the track. So for each polyline I added an onclick handler that opens an info window, centered on the nearest track point neighbor to the click location, that shows the time/elevation for that point. The nearest neighbor is found by storing all points in a quadtree (https://github.com/d3/d3-quadtree).
If you'd like to include these changes, I can submit a pull request for you. If not, that's fine too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.