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
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs