Skip to content

Add id to tilejson#433

Open
frodrigo wants to merge 1 commit intomaptiler:masterfrom
makina-maps:tilejson-id
Open

Add id to tilejson#433
frodrigo wants to merge 1 commit intomaptiler:masterfrom
makina-maps:tilejson-id

Conversation

@frodrigo
Copy link

@frodrigo frodrigo commented Apr 3, 2020

Add the id field to tilejson output. So be able to retrieve the tilejson and rebuild the path to direct tilejson for further usage.

  • On rendered it's on a add.
  • On data it may override the id from the mbtiles.

@klokan
Copy link
Member

klokan commented Apr 3, 2020

Could you, please 🙏 , (ideally before making a pull request proposing a change in the software) make an issue explaining:

  • what is the pain (=what is not possible to do right now with the software)
  • why do you propose to do something (=reason, thoughts context)
  • if you propose a solution (such as "Add id to tilejson") also what are all the advantages/benefits and perhaps disadvantages of your proposed change.

Then somebody can reasonably decide whether a pull request is meaningful and improves the software or not.

@frodrigo
Copy link
Author

frodrigo commented Apr 3, 2020

First I made code because I need it and plan to use it. Since I think it may benefit to other I share it as PR (and change is very small here). I personally think code is simpler to understand than long text explanation when diff is small.

So, actually /styles.json array share style id, but data and rendered (/index.json, /rendered.json; /data.json) are available as tilejson, without id.

I just need style, renderer and data id to store else where and to point later to unitary tilejson path. I need this in my UI. I also need it in my tile expirer to simply known the tile path and expire. To do it I get the id I added to the tilejson arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants