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

Host vector tile without any server #4

Open
brunakov opened this issue Nov 9, 2016 · 4 comments
Open

Host vector tile without any server #4

brunakov opened this issue Nov 9, 2016 · 4 comments

Comments

@brunakov
Copy link

brunakov commented Nov 9, 2016

Here you re mentioning that you can host your vector tiles from a local directory.
In your example you re using "tiles": [location.origin+location.pathname+"countries/{z}/{x}/{y}.pbf"] , however when I run your index.html file I get NS_ERROR_MALFORMED_URI: .
Should I define the tiles path to something else?

@roblabs
Copy link

roblabs commented Dec 28, 2016

This section
https://github.com/klokantech/vector-tiles-sample#display-the-vector-tiles-directly-with-mapbox-gl-js

has a comment about your server settings

the tiles must be hosted in the same domain or you have to ensure CORS are set

@brunakov
Copy link
Author

@roblabs Works with simpleHTTPServer.py . Thank you !

@jmarcos-cano
Copy link

how does someone host their own pbf files generated from mbtiles files?

[mb-util *.mbtiles] => generates a folder "countries/" withe a metadata.json

does tilejson in the root need to match somehow or some fields in metadata.json?

@JeongJun-Lee
Copy link

I'm also finding the solution. Could somebody share us a example code kindly?

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

No branches or pull requests

4 participants