Vector map library and writer - running on Android and Desktop.

Overview

Maven Central Build Status License: LGPL v3

Mapsforge

See the integration guide and changelog. And read through how to contribute guidelines.

If you have any questions or problems, don't hesitate to ask our public forum for help.

License

Mapsforge library is under LGPL v3 license, with an important simplification: the constraints mentioned in sections LGPL v3 §4(d) and §4(e) are waived.

This means that you are allowed to convey a Combined Work without providing the user any way to recombine or relink the application and without providing any shared library mechanism.

In other words, you are allowed to include Mapsforge library in your Android application, without making your application open source.

Screenshots

Android
Desktop
Desktop
Comments
  • Native crash at /system/lib/libskia.so

    Native crash at /system/lib/libskia.so

    We received reports from users about Mapsforge native crash with Skia on Android 6.

    Devices:

    Report: "as soon as you move on the map app crashes. only happened after upgrading to Marshmallow".

    backtrace:
    #00 pc 001febe8 /system/lib/libskia.so (NofilterDXExecutionBuffer565::GenerateUpscaleProgram(int, int, int, int)+128)
    #01 pc 001ff604 /system/lib/libskia.so (NofilterDXExecutionBuffer565::GenerateProgram(int, int, int, int)+132)
    #02 pc 001ff704 /system/lib/libskia.so (NfDXEB565Cache::prepareShaderProc32(int, int, int, int)+232)
    #03 pc 001fd4b0 /system/lib/libskia.so (SkBitmapProcState::beginRect(int, int, int)+336)
    #04 pc 001fdcb4 /system/lib/libskia.so (SkARGB32_Shader_Blitter::blitRect(int, int, int, int)+1568)
    #05 pc 0011ec33 /system/lib/libskia.so
    #06 pc 0011ecfb /system/lib/libskia.so (SkScan::FillIRect(SkIRect const&, SkRegion const*, SkBlitter*)+194)
    #07 pc 0011edc5 /system/lib/libskia.so (SkScan::FillRect(SkRect const&, SkRegion const*, SkBlitter*)+138)
    #08 pc 0011eeb5 /system/lib/libskia.so (SkScan::FillRect(SkRect const&, SkRasterClip const&, SkBlitter*)+56)
    #09 pc 000f9f83 /system/lib/libskia.so (SkDraw::drawRect(SkRect const&, SkPaint const&, SkMatrix const*, SkRect const*) const+522)
    #10 pc 000fb5db /system/lib/libskia.so (SkDraw::drawBitmap(SkBitmap const&, SkMatrix const&, SkRect const*, SkPaint const&) const+452)
    #11 pc 000f2d19 /system/lib/libskia.so
    #12 pc 000f2e29 /system/lib/libskia.so (SkCanvas::onDrawBitmap(SkBitmap const&, float, float, SkPaint const*)+184)
    #13 pc 00051edf /system/lib/libhwui.so
    #14 pc 0008a617 /system/lib/libandroid_runtime.so
    #15 pc 02a64181 /system/framework/arm/boot.oat (offset 0x1fde000)
    
    wontfix 
    opened by devemux86 43
  • Multithreaded Rendering: rendering errors

    Multithreaded Rendering: rendering errors

    The new multi-threaded renderer does not play well with labels/icons across tile borders.

    For the original discussion see: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/mapsforge-dev/x19w0iPealM/K3SgbhwdcowJ

    bug 
    opened by ludwigb 43
  • Missing country map files on FTP server

    Missing country map files on FTP server

    From [email protected] on June 01, 2012 19:10:24

    Related: Issue 127 ( https://code.google.com/p/mapsforge/issues/detail?id=127 )

    There are still version 0.3.0 map files for some European countries missing on the ftp server. On first glance I found Denmark and Belgium missing. There might be more. I guess this is not high priority, but as developers are starting to transition away from 0.2.4 it would be nice to have them all.

    Original issue: http://code.google.com/p/mapsforge/issues/detail?id=320

    imported 
    opened by mapsforge 37
  • Xml Themes: support Android scoped storage and custom ressource providers

    Xml Themes: support Android scoped storage and custom ressource providers

    As agreed with @devemux86 in https://groups.google.com/g/mapsforge-dev/c/4LcJL93sa14:

    This is a PR to introduce scoped storage support also for resource provisioning into mapsforge.

    MapsForgeViewer is adapted as well to give usage examples.

    enhancement 
    opened by eddiemuc 34
  • Writer language improved parsing

    Writer language improved parsing

    The language matcher in OSMUtils.java only handles the alpha-2 code of ISO 639-1:

    private static final Pattern NAME_LANGUAGE_PATTERN = Pattern.compile("(name)(:)([a-z]{2})");
    

    However, I've found language specifiers in OSM data which contain more than two characters... e.g.

        <tag k="name:zh-py" v="Gāoxióng Shì"/>
    

    In the OpenStreetMaps wiki, there is also an example

    name:ko_rm=Mweonga (the name in Romanised Korean)

    which is later corrected to

    name:ko_Latn=Mweonga

    The pattern matcher should just allow arbitrary characters. I would rewrite it myself, but I am not very good with regular expressions.

    enhancement 
    opened by lincomatic 31
  • Peculiar behavior of new label layer

    Peculiar behavior of new label layer

    The new label layer shows a peculiar behavior ...

    That's the result with the label layer (only a few house numbers):

    bildschirmfoto 2016-01-30 um 22 18 27

    And this is the result without the label layer (nearly all (but not all) house numbers are visible):

    bildschirmfoto 2016-01-30 um 22 19 07

    And this is the situation in OSM: http://www.openstreetmap.org/#map=19/51.96395/7.63848

    bildschirmfoto 2016-01-31 um 08 48 47

    The problem occurs with Cruiser (1.4.0 - 20160130) and with Atlas (1.2.0-20160130).

    Klaus

    bug 
    opened by Klaus-Tockloth 30
  • Missing Tunnels

    Missing Tunnels

    junk

    In the attached bitmap, which is in Berlin, Germany, a tunnel is missing. The upper rendering is with Atlas Beta, using the latest Berlin map downloaded from the mapsforge server. The bottom rendering is from openstreetmap.org. Notice in the bottom rendering, there is a tunnel labeled "Tunnel Ortsteil Britz." It is missing from the Mapsforge rendering. I have not yet investigated whether it is an issue with missing data or with the built-in OSMARENDER theme, pending finding out if this is a known issue or not.

    bug 
    opened by lincomatic 28
  • Being able to render tile by tile

    Being able to render tile by tile

    Regarding DatabaseRenderer:

    • the purpose is to render tiles
    • in the context of a visible map
    • being called by an instance of MapWorkerPool

    But that doesn't match a slightly different way of seeing things: a simple "give me that tile". Because DatabaseRenderer:

    • interacts with MapWorkerPool so that it forces a display refresh (MapWorkerPool.this.layer.requestRedraw();), that we don't want here
    • includes some optimizations, like not writing twice the same label (cf. Set<MapElementContainer> undrawableElements), that provokes side-effects (cf. https://github.com/osmdroid/osmdroid/issues/1145)
    • in this last case, potentially because of a bug - as elements are never removed from tileDependencies except in MapWorkerPool, that we don't want to use because of the display refresh

    My suggestion is to create a dedicated class that extends StandardRenderer. The purpose is to have the same level of quality as DatabaseRenderer, but in a simpler context where we will avoid side-effects. The name will be something like DirectRenderer.

    enhancement 
    opened by monsieurtanuki 26
  • Setup Travis continuous integration.

    Setup Travis continuous integration.

    To enable it, all the mapsforge account owner needs to do it log in on https://travis-ci.org and flip the enable switch for the mapsforge repository.

    In a future update, we could add other forms of notifications. Currently, it notifies via GitHub (very convenient!) and I think email.

    A preview can be seen on my account: https://travis-ci.org/schildbach/mapsforge If you want to try out how pull requests work, just open a PR against my GitHub repo and you'll see the Travis integration.

    opened by schildbach 24
  • Invalid Number of Way Nodes

    Invalid Number of Way Nodes

    It is a common occurrence to get a warning message from this block in MapFile.java:

            if (numberOfWayNodes < 2 || numberOfWayNodes > Short.MAX_VALUE) {
                LOGGER.warning("invalid number of way nodes: " + numberOfWayNodes);
                // returning null here will actually leave the tile blank as the
                // position on the ReadBuffer will not be advanced correctly. However,
                // it will not crash the app.
                return null;
            }
    

    with numberOfWayNodes == 0. I'm guessing it's a bug in the map writer. An example is in japan.map, in the block where z=4,x=13,y=6

    bug 
    opened by lincomatic 22
  • Persistent cache 2

    Persistent cache 2

    Includes improvements discussed with Emux and Ludwig:

    • Read entire cache dir when initializing a persistent cache
    • Reliably enforce cache size for persistent cache (data from previous instances is now included in the count)
    • Fixed NPE which occasionally occurred in FileSystemTileCache#containsKey() when persistence was enabled
    • Added test case for persistent tile cache
    • Added missing compatibility constructors and helper methods for apps migrating from 0.5.0
    • Use file timestamp to determine age of map file
    • Changed TTL to TimeToLive in identifiers
    • Comment for default TTL (86400000 millis = 1 day)
    • Changed default Mapnik TTL to 8279s (current OSM setting) and added comment

    As mentioned before, in order to enforce cache size (and also to fix the NPE Ludwig found) I now examine the entire cache dir when the cache is initialized and enter anything I find there in the lruCache. This might affect startup performance if the cache dir holds a large number of files.

    enhancement 
    opened by mvglasow 22
Releases(0.18.0)
  • 0.18.0(Jun 18, 2022)

    What's Changed

    • Update cgeo link and include WhereYouGo by @Lineflyer in https://github.com/mapsforge/mapsforge/pull/1278
    • Update Gradle by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1285
    • Multiple maps: optimize deduplicate by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1288
    • Update SVG Salamander by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1289
    • Validate coordinates option by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1294
    • AwtUtil: improve getMinimumCacheSize by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1305
    • AwtUtil: improve getMinimumCacheSize by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1306
    • AwtUtil: improve getMinimumCacheSize by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1307
    • Update Gradle by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1314
    • MapView: add try / catch for child views by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1319

    New Contributors

    • @Lineflyer made their first contribution in https://github.com/mapsforge/mapsforge/pull/1278

    Full Changelog: https://github.com/mapsforge/mapsforge/compare/0.17.0...0.18.0

    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Jan 3, 2022)

    What's Changed

    • tag-mapping: add place=neighbourhood by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1221
    • Render themes: add place=neighbourhood by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1222
    • Update Mapsforge-Applications.md by @telemaxx in https://github.com/mapsforge/mapsforge/pull/1241
    • Add charging station symbol by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1242
    • Update Android by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1246
    • Update android.yml by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1247
    • Fix compile warnings by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1248
    • Samples: fix warnings by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1249
    • Gradle 7 by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1254
    • Add parking motorcycle symbol by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1261
    • Fixes svg cache hashing algo when working with resource providers by @eddiemuc in https://github.com/mapsforge/mapsforge/pull/1263
    • AwtCanvas fill color with alpha by @devemux86 in https://github.com/mapsforge/mapsforge/pull/1274

    Full Changelog: https://github.com/mapsforge/mapsforge/compare/0.16.0...0.17.0

    Source code(tar.gz)
    Source code(zip)
Owner
mapsforge
mapsforge
The JTS Topology Suite is a Java library for creating and manipulating vector geometry.

JTS Topology Suite The JTS Topology Suite is a Java library for creating and manipulating vector geometry. It also provides a comprehensive set of geo

LocationTech 1.5k Jan 6, 2023
Planetiler - Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Mapbox Vector Tiles from geographic data sources like OpenSt

On The Go Map 749 Jan 2, 2023
Flexible tool to build planet-scale vector tilesets from OpenStreetMap data in a few hours

Planetiler Planetiler (pla·nuh·tai·lr, formerly named "Flatmap") is a tool that generates Vector Tiles from geographic data sources like OpenStreetMap

On The Go Map 748 Dec 27, 2022
Open source routing engine for OpenStreetMap. Use it as Java library or server.

GraphHopper Routing Engine GraphHopper is a fast and memory efficient Java routing engine, released under Apache License 2.0. By default it uses OpenS

GraphHopper 4k Jan 3, 2023
LocationTech Spatial4j: A Geospatial Library for Java

Spatial4j (note: Spatial4j's official home page is at LocationTech: https://projects.eclipse.org/projects/locationtech.spatial4j but this README has r

LocationTech 880 Dec 23, 2022
An easy-to-implement library for the GeoHash algorithm

Overview An easy-to-implement library that can assist Java developers in using the GeoHash algorithm in order to create geocodes based on custom latit

Asterios Raptis 63 Mar 25, 2022
LocationTech Spatial4j: A Geospatial Library for Java

Spatial4j (note: Spatial4j's official home page is at LocationTech: https://projects.eclipse.org/projects/locationtech.spatial4j but this README has r

LocationTech 880 Dec 23, 2022
OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.

$Source: /cvs/distapps/openmap/README,v $ $RCSfile: README,v $ $Revision: 1.11 $ $Date: 2002/11/06 19:11:02 $ $Author: bmackiew $ OpenMap(tm) What

OpenMap 65 Nov 12, 2022
An open-source GIS and remote sensing package

Whitebox Geospatial Analysis Tools This page is related to the open-source GIS Whitebox GAT. If you are instead interested in the stand-alone command-

John Lindsay 170 Apr 5, 2021
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. Designed for interoperability, it publishes data from any major spatial data source using open standards.

GeoServer 3k Jan 1, 2023
Vector map library and writer - running on Android and Desktop.

Mapsforge See the integration guide and changelog. And read through how to contribute guidelines. If you have any questions or problems, don't hesitat

mapsforge 1k Jan 7, 2023
Tree View; Mind map; Think map; tree map; custom view; 自定义; 树状图;思维导图;组织机构图;层次图

GysoTreeView 【中文】【English】 ⭐ If ok, give me a star ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ Tree View; Mind map; Think map; tree map; 树状图;思维导图;组织机构图;层次图;树型图 A custom tree view for

怪兽N 303 Dec 30, 2022
Squaremap is a minimalistic and lightweight world map viewer for Minecraft servers, using the vanilla map rendering style

squaremap squaremap (formerly known as Pl3xMap) is a minimalistic and lightweight live world map viewer for Minecraft servers. What is squaremap If, l

Jason 204 Jan 3, 2023
High performance CSV reader and writer for Java.

FastCSV ?? FastCSV 2.0 upgrade has landed with major improvements on performance and usability! FastCSV is an ultra-fast and dependency-free RFC 4180

Oliver Siegmar 411 Dec 22, 2022
An efficient, up-to-date reader/writer for Java properties files

JProperties JProperties is a small, highly efficient, and extensible library for parsing .properties files. It is a modern replacement for the java.ut

Aidan 12 Apr 1, 2022
The JTS Topology Suite is a Java library for creating and manipulating vector geometry.

JTS Topology Suite The JTS Topology Suite is a Java library for creating and manipulating vector geometry. It also provides a comprehensive set of geo

LocationTech 1.5k Jan 6, 2023
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022
A Java Virtual Machine - running on a Java Virtual Machine - running on a (jk).

Javaception A Java Virtual Machine - running on a Java Virtual Machine - running on a (jk). Goals JVMS compliant Java Virtual Machine Somewhat fast Re

null 33 Oct 10, 2022