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 the Discussions 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
Renderers is an Android library created to avoid all the boilerplate needed to use a RecyclerView/ListView with adapters.

Renderers Renderers is an Android library created to avoid all the RecyclerView/Adapter boilerplate needed to create a list/grid of data in your app a

Pedro Vicente Gómez Sánchez 1.2k Nov 19, 2022
Android library to auto-play/pause videos from url in recyclerview.

AutoplayVideos Show some ❤️ and star the repo to support the project This library is created with the purpose to implement recyclerview with videos ea

Krupen Ghetiya 989 Nov 17, 2022
:page_with_curl: [Android Library] Giving powers to RecyclerView

Android library that provides most common functions around recycler-view like Swipe to dismiss, Drag and Drop, Divider in the ui, events for when item

Nishant Srivastava 644 Nov 20, 2022
[] Easy Adapters library for Android

Deprecated Due to the growing use of the RecyclerView and the RecyclerView.Adapter provided adapter class, Easy-Adapter is now deprecated. Whilst the

ribot 425 Nov 25, 2022
This library provides GridAdapters(ListGridAdapter & CursorGridAdapter) which enable you to bind your data in grid card fashion within android.widget.ListView, Also provides many other features related to GridListView.

GridListViewAdapters This libarary enables you to implement GridView like card layout within ListView with added capabilites like Paginations, Additio

Biraj Patel 270 Nov 25, 2022
This library provides Easy Android ListView Adapters(EasyListAdapter & EasyCursorAdapter) which makes designing Multi-Row-Type ListView very simple & cleaner, It also provides many useful features for ListView.

EasyListViewAdapters Whenever you want to display custom items in listview, then only way to achieve this is to implement your own subclass of BaseAda

Biraj Patel 132 Nov 25, 2022
Android library for the adapter view (RecyclerView, ViewPager, ViewPager2)

Antonio Android library for the adapter view (RecyclerView, ViewPager, ViewPager2) Free from implementation of the adapter's boilerplate code ! Reuse

NAVER Z 106 Dec 23, 2022
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...

FastAdapter The FastAdapter is here to simplify creating adapters for RecyclerViews. Don't worry about the adapter anymore. Just write the logic for h

Mike Penz 3.7k Jan 8, 2023
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 7, 2023
A library to make a mosaic with a preview of multiple images

Preview Image Collection Introduction Preview Image Collection is a library to draw a collage with a number of images like facebook preview album Inst

Agnaldo Pereira 50 Jun 13, 2022
Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.

smart-recycler-adapter Never code any boilerplate RecyclerAdapter again! This library will make it easy and painless to map your data item with a targ

Manne Öhlund 405 Dec 30, 2022
Android - A ListView adapter with support for multiple choice modal selection

MultiChoiceAdapter MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmai

Manuel Peinado Gallego 855 Nov 11, 2022
Adapter Kit is a set of useful adapters for Android.

Adapter Kit Adapter Kit is a set of useful adapters for Android. The kit currently includes, Instant Adapter Instant Cursor Adapter Simple Section Ada

Ragunath Jawahar 368 Nov 25, 2022
Simplify Adapter creation for your Android ListViews.

FunDapter takes the pain and hassle out of creating a new Adapter class for each ListView you have in your Android app. It is a new approach to custom

Ami Goldenberg 287 Dec 22, 2022
Generate data-view-binding adapters of android recycler view.

Items 这个库可以为 Android 的 RecyclerView 生成基于 Data-View-Binding 的 Adapter。 对比其他一些类似的开源库,它有以下的一些优势: 更好的拓展性。这个库不需要你继承特定的 Adapter 或 ViewHolder 类,你可以继承任何第三方提供的

nekocode 253 Nov 11, 2022
Just like instant coffee, saves 78% of your time on Android's Custom Adapters.

Notice Instant Adapter is now part of an even more awesome Adapter Kit project! Instant Adapter Just like instant coffee, saves 78%* of your time on A

Ragunath Jawahar 232 Nov 25, 2022
The powerfull Diff Util in Android Recycler View

DiffUtil The powerfull Diff Util in Android Recycler View What is RecyclerView ? RecyclerView is flexible and efficient version of ListView. It is an

Lloyd Dcosta 1 Sep 30, 2021
An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.

⚠️ Archived: this repository is no longer going to be maintained. SectionedRecyclerViewAdapter An Adapter that allows a RecyclerView to be split into

Gustavo Pagani 1.7k Dec 21, 2022
The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.

Il Bil App Introduction I will introduce you to how to implement Account Kit, Map Kit, Game Service. About the game: The app has got fullscreen Turkey

Gökhan YILMAZ 4 Aug 2, 2022
Tree View; Mind map; Think map; tree map

A custom tree view for Android, designed for easy drawing some tree nodes (e.g. thind mind and tree nodes). Includes smoothly zoom, move, limit and center fix animation support, and allows easy extension so you can add your own child node's customs view and touch event detection.

怪兽N 304 Jan 3, 2023