NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

'm trying to create an app that contains a small map that should always work without internet connection for four different zoom levels. To do this i know that i have to generate map tiles in png (or similar) to be used later on by Leaflet (or Open Layer/Mapbox GL JS) . This is no issue, because using Maperitive i can generate map tiles with given bounds and min and max zoom levels.

My problem is that i need to use a different style for roads, buildings, etc. To edit this style i used Mapbox Studio online editor and generated a JSON file with my custom styles.

What i need to do is apply this style before generating the resulting tiles, but i don't know how to do this. Below there's a diagram for what i'm thinking about.

Diagram

asked 18 Apr '17, 19:38

rr%20alves's gravatar image

rr alves
30114
accept rate: 0%


The Mapbox Studio style json is used to visually render Mapbox vector tiles in the browser using Mapbox GL JS. There is no mechanism to convert these into the png tiles that you are expecting unfortunately.

Your best bet might be to create multiple maperitive styles and generate the tiles.

permanent link

answered 19 Apr '17, 08:58

PlaneMad's gravatar image

PlaneMad
28237
accept rate: 33%

Thanks for the reply. I'll follow Maperitive documentation.

(19 Apr '17, 09:05) rr alves
1

It worked. It's a bit harder to style than Mapbox but works.

(19 Apr '17, 15:26) rr alves

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×362
×287
×40

question asked: 18 Apr '17, 19:38

question was seen: 5,705 times

last updated: 19 Apr '17, 15:26

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum