question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mbgl-render didn't use local mbtiles

See original GitHub issue

I use raster png files as mbtiles but my picture is empty

mbgl-render -r 1 -c 51.388,35.7026228 -z 12 -t /home/ali/disk2/tiles/raster ~/Programming/map/TileProvider/dynamic/style_raster_test.json test.png 512 512 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
brendan-wardcommented, Jan 26, 2019

@aliir74 are your tiles stored as individual PNG files on disk, or are they stored within an mbtiles file? If the former, we don’t support the use case, you would need to put a tile server in front of your tiles rather than fetching straight from disk.

In theory, someone could develop and add the functionality to use tiles directly from disk in the way you are trying to do here, but that is not something I’m available to tackle right now.

the mbtiles:// source is a convenience method for connecting directly to an mbtiles file (spec here: https://github.com/mapbox/mbtiles-spec) on disk, since we have a known pathway for querying all information we need about the tileset from the mbtiles file.

0reactions
aliir74commented, Feb 6, 2019

I changed my style address to below and the code worked. Thanks for your support!

"sources": {
    "high_update": {
      "type": "vector",
      "tiles": [
        "mbtiles://high-very-little/{z}/{x}/{y}"
      ],
      "minzoom": 3,
      "maxzoom": 16
    },
    "low_update": {
      "type": "vector",
      "tiles": [
        "mbtiles://low-very-little/{z}/{x}/{y}"
      ],
      "minzoom": 3,
      "maxzoom": 16
    }
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a static map renderer using the Mapbox GL Native ...
Once we started investigating the Mapbox GL Native NodeJS API, we realized that we could render local mbtiles tilesets by fetching the tiles ......
Read more >
Cannot render vector tiles (.mbtiles) file with leaflet
I am trying to render some locally-stored ...
Read more >
roblabs/mbgl-renderer - Docker Image
This package helps you create static map images using Mapbox GL. ... is that you can use locally hosted mbtiles files with your...
Read more >
MapBox SDK load local MBTiles - GIS Stack Exchange
I don't want to use a local web server for this. mapbox · android · vector-tiles · sdk · openmaptiles · Share.
Read more >
MBTiles | Help - Mapbox docs
MBTiles is a file format for storing tilesets. ... Note that the mobile SDKs do not support offline use of MBTiles directly. MBTiles...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found