Closed riccardoklinger closed 9 years ago
Your grid.json has grid(
at the start (and a matching );
at the end).
If you get rid of that then you can use useJsonP: false
and it should work I think?
hi dave, thanks for the reply. I've created also a question on gis.stackexchange: http://gis.stackexchange.com/questions/127955/serving-utfgrid-information-made-with-mb-util-with-leaflet
maybe it will give some more information... I'll try your suggestion and report back in!
it was working! so you you need to create the tiles with the following command: mb-util --grid_callback="" tiles.mbtiles path/to/tiles when you open the index.html make sure it is in the same folder as your utfgrid tiles. It will also throw an error when you open the index.html in the browser with var/www/html/index.html but define your utfgrid like http://localhost/z/x/y... Now everything is fine! Thanks again for the suggestion!
I am working with mb-util to export the utfgrid and mbtiles with the following command: mb-util --scheme=xyz /folder/tile.mbtiles /var/www/html/my-tiles when using the same syntax like in your example I get the following error in the console: ReferenceError: grid is not defined my grid.json files normaly look like this:
grid({"keys": ["", "6402"], "data": {"6402": {"namen": "cool name", "attrib 1": 0.123456}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !!! ", " !!!!! ", " !!!!!!! ", " !!!!!!!! ", " !!!!!!!!! ", " !!!! !!!! ", " !! !!!!! ", " !!! !!!!! ", " ! ! ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "]});
Is it possible for you to update your example/instruction for mb-util users who would like to be independet from mapbox?!