We have been developing an iOS Guru Maps application (formely known as Galileo Offline Maps) since the 2010. While porting the app to Android, we wanted to reuse as much app code as possible and created a cross-platform library to keep the shared code for the map component.
Over time, we realize that this component will benefit everyone building a map-based app and decided to offer it to other developers as a framework.
Thus we developed the GLOBUS framework alongside our app, and it continues to innovate and to evolve, beside the GLMap component, there are other, such as GLSearch and GLRoute.
It comprises everything about displaying the map and the data on the map. Special attention was paid to the speed of the code and offline work.
There were developed the following parts:
Binary data format
For quick reading of offline maps from the disk, we have developed a map format that uses only the data necessary for rendering. All the map data is divided into tiles for quick download and the geometry of objects in each tile is simplified. Tags that are not used for drawing into the map are not saved.
In addition to the data about the objects on the map, the map contains search indexes necessary for offline search work.
For customizing the appearance of the map, CSS-like language for map stylesheets, called MapCSS, has been selected. It allows you to easily describe the appearance of an object, depending on its type, tags and current map scale.
GLMap supports customization of styles and quick switching between styles.
Map is rendered on GPU, that allowes to free the CPU from unnecessary calculations and smoothly render the map at 60 fps, even on older devices.
We use OpenGL ES 2.0, 3.0 и Metal with extensions for extra speed on modern devices. The newer the device, the newer the API will be used to work with the GPU.
Multilingual text rendering
Text renderer works with all languages of the world. Fonts are loaded directly from TTF files and do not require preprocessing.
Text rendering to the atlas is done using Signed Distance Field technology, which allows you to render a letter only once and then draw text with different sizes, colors and thicknesses of letters or outlines from the same texture.This saves the amount of graphics memory used, especially when working with hieroglyphics.
The Harfbuzz library is responsible text shaping. It decides what ligature should be used for symbol or group of symbols, and where it should be drawn.
The search and everything related to it. The format of vector maps has been optimized to effectively store search indexes with address information, as well as information about administrative regions.
All search operations work offline, directly on the user's device. Absolutely free of charge and not limited by the frequency of requests per second or any other limits.
searching by address
searching by type
searching by parts of a word
searching within administrative boundaries
finding an administrative boundaries for the point on the map
finding a nearby address for any location
To calculate route the open-source solution called Valhalla is used. It's one of the best routingservices in the world. It allows you to quickly build routes and generate clear turn-by-turn instructions for them.
The route guidance is covered byGLRouteTracker. It determines the user's position on the route, generates rich narrative guidance that's available in multiple languages: the next manoeuvre, the remaining time and the distance to the finish line.
GLRoute can use saved navigation data and then the routes could be built offline on the user's device. Also, for a small fee, GLRoute can request routes online.