Installing the FQMHR map on a Garmin GPS

Discussion in 'Mapping & Navigation' started by boulet_boulet, Sep 17, 2021.

  1. boulet_boulet

    boulet_boulet Long timer

    Joined:
    May 14, 2018
    Oddometer:
    2,228
    Location:
    Maine
    Let’s say you want a Quebec motorcycle trail map installed on your Garmin GPS. Yes, I know that you can just use the FQMHR map on a smartphone for free, but suppose you don’t want to use a phone, or you have cross-border data issues, or you just really like your Garmin. Here is what worked for me on both an old Nuvi and a Zumo XT:

    Gather the data
    1. The FQMHR map can be found at https://www.fqmhr.qc.ca/en/carte.php.
    2. Look at the underlying HTML (ctrl-U in Firefox) and you will see the following on line #161: <iframe id='interactive_map' style='margin-bottom: 20px' src='../content/map/map.html?v2' width='100%' height='700px' frameborder='0'></iframe>. Click on the src link to ../content/map/map.html?v2' width='100%' height='700px' frameborder='0'
    3. This should bring you to the underlying HTML for the page that provides the content in that map window, https://www.fqmhr.qc.ca/content/map/map.html?v2. You can also just go directly to that URL to see the map as a standalone page, not framed in the FQMHR site.
    4. Back at the code for the stand-alone map page, you should see the following on lines 21-25:
    new google.maps.KmlLayer({ url: 'http://www.fqmhr.qc.ca/content/map/kml/fqmhr-poi2019.kmz?v=dc64edc1-41cf-4038-b85a-62f40f0305b5', zIndex: 5, map: map });
    new google.maps.KmlLayer({ url: 'http://www.fqmhr.qc.ca/content/map/kml/Local.KMZ', zIndex: 1, map: map });
    new google.maps.KmlLayer({ url: 'http://www.fqmhr.qc.ca/content/map/kml/Provincial.kmz?v=dc64ddc1-41cf-4038-b85a-62f40f0305b1', zIndex: 2, map: map });
    new google.maps.KmlLayer({ url: 'http://www.fqmhr.qc.ca/content/map/kml/Regional.kmz?v=dc64ddc1-41cf-4038-b85a-62f40f0305b9', zIndex: 3, map: map });
    //new google.maps.KmlLayer({ url: 'http://www.fqmhr.qc.ca/content/map/kml/fqmhr-trails-4.kmz?v=dc64ddc1-41cf-4038-b85a-62f40f0305bc', zIndex: 4, map: map });}


    Import the map data
    Each of those is a URL linking to specific map data elements, links to the hosted tracks files at Google. KML / KMZ files are roughly equivalent to GPX data, I believe Google’s proprietary version on the same.
    1. Open up Basecamp and make a new list in a new list folder, name them both FQMHR data or whatever makes the most sense to you (File, New, List folder, the List).
    2. Keeping the new list highlighted, go to File, Import (or ctrl-I) and instead of picking a file from your computer, enter each google map URL into the File Name field of the dialog box / file picker(see below). E.g., http://www.fqmhr.qc.ca/content/map/kml/fqmhr-poi2019.kmz?v=dc64edc1-41cf-4038-b85a-62f40f0305b5
    3. Continue importing the rest of the links located on lines 21-25 of that page’s code. When you are done you should have the FQMHR Map displayed in Basecamp when that List Folder is highlighted. The trails are probably displaying in gray.
    Import dialog box.png

    Edit the map data

    Before we move the new info to the Garmin, let’s make the trails show up a little better. Personally I find displaying the trails in green makes them distinct from other items on my map, though you might have another favorite track color. Here’s how I edit them:
    1. Make sure that just the tracks and not waypoints are selected. Since there are now 2,853 tracks in my library, not a small amount, I break them up into smaller chunks and do the following
    2. Click on the first track that you want to edit and the last one while holding down the Shift key. This should highlight all of them and bring up a Basecamp dialog box. Choose your new color and hit enter. Depending on your computer speed and how many you’ve selected, the selected trails will change their display color. Continue until you are done with all tracks. I did mine in bites of about 200-500 tracks at a time and it took a while.
    Track list.png
    Color change.png

    Make the new map

    Once your track colors are edited and ready for prime time on your Garmin, it’s time to make a new map using some third party software from your edited GPX files. More information on this topic can be found here. Here is what I do:
    1. Download and install IMGfromGPX or other equivalent software.
    2. Export your edited GPX tracks from Basecamp to a location on your computer.
    3. Dump the edited GPX tracks all into the IMGfromGPX software, adjust naming variables, etc. and voila! you have a gmapsupp.img file that you can install on a folder of your Garmin. The specific location varies from GPS to GPS.
    4. Reboot your device, make sure the new map is displayed and your new map should be recognized.
    You should now have the FQMHR map displayed on your GPS. I suggest revisiting this process at least yearly to keep up on new / discontinued trails.
    #1