Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return tilejson #4

Closed
1 task done
pnorman opened this issue Aug 24, 2014 · 5 comments · Fixed by #57
Closed
1 task done

Return tilejson #4

pnorman opened this issue Aug 24, 2014 · 5 comments · Fixed by #57

Comments

@pnorman
Copy link
Contributor

pnorman commented Aug 24, 2014

The data.xml for Mapnik includes information for returning a tilejson

That JSON fragment doesn't include all the information needed for a tilejson, but other parameters provide the name, min/max zoom, center. The required "tiles" key may need another command line option, since that varies depending on the hostname, and if you are accessing it remotely, localhost doesn't work.

To-do:

  • Can we get the parameters from Mapnik, or do we parse the XML ourselves?

mapbox/tilejson-spec#14 has some examples of the format, since it's not formally documented

@pnorman pnorman mentioned this issue Nov 12, 2014
@zerebubuth
Copy link
Contributor

Do we consider this fixed? There's still some stuff (descriptions, comments, etc...) missing from the TileJSON. Do we want to include those and, if so, do we have a source we can get them from?

@pnorman
Copy link
Contributor Author

pnorman commented Dec 4, 2014

description works if the XML has a description set.

center looks to be the one that remains an issue with avecado echoing the string from the XML when the JSON should have an array. bounds is probably the same, but doesn't show up in world-wide testing.

@zerebubuth
Copy link
Contributor

What do you reckon the best thing to do is? Put the contents of bounds and center in verbatim, which is easy but might mean producing invalid JSON? Or put some code in there to parse the arrays of numbers and verify their validity?

@pnorman
Copy link
Contributor Author

pnorman commented Dec 5, 2014

currently center is repeated verbatim, and produces valid json but invalid tilejson.

The right thing to do is create an array out of the string in the XML. On the other hand, I'm not sure it actually matters, given that I've yet to find a workflow that actually relies on bounds or center.

@pnorman
Copy link
Contributor Author

pnorman commented Dec 9, 2014

MBS relies on a valid center.

pnorman added a commit that referenced this issue Dec 10, 2014
Fixes #4

This does not validate that the parameter in the Mapnik XML is valid,
but if it is valid, it will result in a valid TileJSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants