Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to see polyline on GPS. First, I try to convert polyline to GPX. I uploaded GPX on GPS. SO far, I could not see the line on GPS.

First of all,is it possible to see polyline as route or track data on GPS?

share|improve this question
What GPS unit are you using, what data source are you using for the polyline? Was it a GPS output? – lewis Feb 10 '13 at 16:00
I'm Using Garmin GPS map62S. Data source of polyline is polygon(I converted on QGIS). – Jermain Marthin Feb 11 '13 at 21:58
It is possible, I'd check the data format and the help instructions that come with your unit for the relevant steps and see which step is the problem or which format other than gpx might be suitable, you could just reupload the output without a conversion I would think, does you unit support this operation is the only other thing I can think of, most modern gps units with a map display should. – lewis Feb 12 '13 at 13:02

Just endeded doing what you're asking. I saved on a gpx "generic" file coordinates and I'll set the file up when I'll land where I'm going to go (I'm gonna rent a gps device, so I still don't know what model will be).

When you create a polyline, then you can reach your coordinates using that function:

    var tra;
    dojo.connect(tb, "onDrawEnd", getCoords);
            function getCoords(geo) {
                    // reach every line
                    for ( var path = 0; path < geo.paths.length; path ++ ) {                  
                        // reach every point
                        for ( var pt = 0; pt < geo.paths[path].length; pt++ ) { 
                            tra += '<wpt lat="'+geo.paths[path][pt][0]+'" lon="'+geo.paths[path][pt][1]+'"></wpt>';

Then I send the "tra" var to a php file that saves its content to a gpx file with this header:

<?xml version="1.0"?><gpx version="1.0" xmlns:xsi="" xmlns="" xsi:schemaLocation=""><time>2014-01-31T17:38:33Z</time>

Then, before closing the file, write:


Hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.