QMapShack visualizes maps and tracks
Map Viewer
QMapShack displays a wide variety of maps, making it easy to plan and manage your journeys.
QLandkart GT was once considered the best tool for displaying free maps on Linux and loading them on Garmin devices. Map enthusiasts were quite disappointed when the project came to a halt a few years ago, but fortunately, a number of developers quickly came together and launched a new project that extended the functions of QLandkarte.
QMapShack [1] lets you display map data from various sources, both online and offline. You can visualize, create, and edit GPX tracks and routes. Automatic routing is even possible. QMapShack combines information from different sources as a "project," which makes the program interesting for larger projects with several different elements. All in all, QMapShack is best described as a universal map planning and routing tool.
QMapShack Hands On
Some Linux package repositories contain packages for QMapShack, but they might not have the latest version. See the box entitled "Building QMapShack" for a brief look at how to build a QMapShack application yourself.
Building QMapShack
Most current distributions do not yet include the current QMapShack version 1.11.0 in the package sources, so you usually have to build the latest version of the application yourself. You need the Mercurial versioning system (version 4, or preferably 4.5) and CMake or CCMake v3.1. You also need GDAL, PROJ.4, and Routino, as well as QuaZIP and Qt v5.
Listing 1 shows the individual steps. First, clone the Mercurial repository to the local disk. Then create a working directory and change to the new folder. Now use CCMake to create a makefile: Create the configuration in the Ncurses interface by pressing C. Press G to create the makefiles and Q to end CCMake.
The make
call builds the programs under bin/
. This step creates several binaries: the main program qmapshack
, the qmaptool
utility for displaying maps, and the qmt_map2jnx
and qmt_rgb3pct
tools for converting data formats. sudo make install
lets you import the program to /usr/local/
per the previously defined settings.
If necessary, you can update QMapShack directly from the cloned directory. Change back to the working directory and get the current code by typing:
hg pull && hg update
Re-running make
generates the new version, and sudo make install
installs the update.
Listing 1
Installing QMapShack
QMapShack comes up with an intuitive user interface (Figure 1). The most important functions are in the menu and toolbar. QMapShack supports various online and offline map formats, especially VRT, TMS, WMTS, RMAP, and Garmin IMG (see the "GMap" box).
GMap
One of the special features of QMapShack is the support for Garmin IMG files. This features is limited to maps created by mkgmap for Garmin devices, but QMapShack handles them very well. Testing an IMG file with QMapShack works much better than trying to test it with a navigation device. In addition, you can use the IMG info offline with QMapShack (i.e., exactly where it is important: outdoors, where no Internet is available). Currently the developers are working on the possibility of integrating navigation devices, such as GPS coordinate generators, with QMapShack.
Configuration
The setup process for QMapShack has improved considerably since the last version. In the past, you had to create special directories for many aspects of the program and enter them in the configuration. The current version simplifies this step: Using the Give me a path… link on the welcome page (Figure 1), you just enter a base directory, and all the required folders are automatically created by QMapShack and entered in the configuration. Keep in mind that 10GB or more can quickly accumulate below the base directory. You may therefore need to distribute the different directories across several drives.
Offline maps are configured using File | Setup map paths (Figure 2). When you get there, you will see the path under which the software saves the map tiles (in the standard configuration, the default is ~/.QMapShack/
). The application only loads maps from the specified folder, not from its subfolders.
If you do not have offline maps, you can also revert to online maps. For example, *.tms
("Tile Map Server") files are used with online map services. The button with the plus symbol lets you add maps and map directories. When you create new .tms
files, they will appear in the left view window of QMapShack under the file name you specify. The program won't distinguish identical file names in different directories, so make sure you don't give two files the same name (Figure 3).
In addition to real maps, QMapShack also displays arbitrary tiles (e.g., the aerial images provided by Microsoft on Bing). Integrating these images is not exactly intuitive, as Listing 2 shows. Please note that the legal situation is not clear for all map sources: Google does not allow the use of its tiles with programs other than Google Earth or its own online services. In addition, some of the maps are not very practical and only cover small areas or provide small zoom ranges. Others, such as the Alpine map, have a considerable scope and show many details.
Listing 2
Integrating Tiles
In addition to pure map data, QMapShack also supports the use of Digital Elevation Model (DEM) data, which refers to digital elevation or terrain data. A whole series of servers provide DEM data that you can integrate into QMapShack as online maps. The original documentation dedicates a separate chapter [2] to the topic of DEM maps.
Navigating in the map window is quite intuitive: Hold down the middle mouse button to move the displayed map section, and use the mouse wheel to scale the view size. (By the way, you can use the same feature when creating tracks and routes.)
Services such as OpenCycleMap place a watermark on tiles until the user registers and obtains an API key (see the box entitled "API Key for OpenCycleMap.")
API Key for OpenCycleMap
The OpenCycleMap server operated by Thunderforest.com (and some others) requires an API key to deliver tiles without an API Key Required message (Figure 4). You receive the key free of charge [6] after registration as part of a noncommercial project. After a confirmation email, you will find the API key in the service's dashboard.
You then need to configure QMapShack so that the application sends the API key to the OpenCycleMap tile server with every request. Open the OpenCycleMap.tms
file in the map directory, which only contains a few lines of XML code (Listing 3). In the <ServerUrl>
line, add the API key with ?apikey=API key
before the closing </ServerUrl>
. This modification gives you "undisturbed" tiles from the OpenCycleMap server again.
Where the OpenCycleMap.tms
file is located in the configuration files depends on several factors and can be specified with Setup map paths
during configuration. When importing old data from QLandkarte, you will often find it below ~/qlandkartegt-Konto/OpenCycleMap.tms
. If necessary, search for this file using find ~ -iname OpenCycleMap.tms
.
Listing 3
Setting Up OpenCycleMap
Installing Maps
Manually installed maps must first be activated. To activate or deactivate a map, right-click on the map in the list and choose the function in the context menu (Figure 5). QMapShack always sorts enabled map views at the top of the list.
QMapShack lets you enable multiple maps at the same time. For example, you could superimpose an aerial image on a map display or vice versa. This feature allows completely new forms of "realistic" map images, which, until now, could only be created by combining the maps with image-processing techniques.
The order of the maps plays an important role: Maps further down the list cover the maps above. The opacity of each activated map is controlled by a hidden dialog that opens after a mouse click on the small triangle in front of the map icon (Figure 6). The uppermost slider controls the opacity of the layer.
You also need to pay attention to the two sliders below: Cache Size (MB) limits the amount of disk space used per map view, and Expiration (Days) automatically removes obsolete tiles and replaces them later when the region is called.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.