Code Monkey home page Code Monkey logo

Comments (5)

typebrook avatar typebrook commented on May 27, 2024 1

So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

@SpeedFire0
I have my first try on mbtiles protocol yesterday, and it works fine.
Here is my related code (maybe it is not clear):
https://github.com/typebrook/mapstew-android/blob/3c6190b401/app/src/main/java/io/typebrook/mapstew/map/MaplibreFragment.kt#L125

Anyway, the format for each mbtiles source should be looks like:

{
  "id": "mbtilesSource",
  "tiles": [
    "mbtiles://{PATH_TO_YOUR_MBTILES}"
  ]
}

In my case, I put mbtiles in my app's interal storage for database. So PATH_TO_YOUR_MBTILES is context.getDatabasePath("test.mbtiles")

from maplibre-native.

tir38 avatar tir38 commented on May 27, 2024 1

Am I right to understand that this is for shipping tiles with an apk. This is not about downloading tiles in-app and using later when offline as in this sample?

from maplibre-native.

roblabs avatar roblabs commented on May 27, 2024

Support for other protocols besides https are in the code, but I agree it could use some upgrades in the documentation. Pull requests for documentation and test samples are welcome.

Protocols asset://, file://, and mbtiles:// are listed in the MapLibre code. mbtiles:// is new to MapLibre since its donation by MapTiler. The asset and file protocols were in Mapbox GL native.

https://github.com/maplibre/maplibre-gl-native/blob/cd8d56467962cfb4c99418b0226d9ea2adb48c30/include/mbgl/util/constants.hpp#L62-L65


Here is a list of published apps which mention using MapLibre. A future Wiki should list the published apps that make use MapLibre.

from maplibre-native.

carlos-mg89 avatar carlos-mg89 commented on May 27, 2024

Thanks for the info @roblabs I'd definitely give it a try!

from maplibre-native.

SpeedFire0 avatar SpeedFire0 commented on May 27, 2024

So far I've seen how to set it up, but not how to interact with it. E.g.: add markers, draw paths, etc.

Hi, can you please share how you were able to set it up? Is there any documentation?

from maplibre-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.