maptiler/tileserver-php

tileserver-php : localhosting of vector tiles on windows

nkd07 opened this issue · 1 comments

nkd07 commented

Hi everyone,
I am trying to locally host on a windows 10 machine, vector tiles ( .mbtiles )downloaded from openmaptiles.org. I am following the directions given at https://openmaptiles.org/docs/host/tileserver-php/
I have downloaded and put the tileserver-php master (.zip extract) in the htdocs folder of my xampp installation. I have also verified the x-ray view is available through a web brower, so all is okay and the styles need to be applied.
Next, I downloaded the gh-pages of osm-bright-gl-style and extracted it to a folder inside my htdocs folder. The final folder structure is -
+htdocs
|_ tileserver-php
| |_ tileserver.php
|_ osm-bright
|_ style-cdn.json
|_ sprite.json, sprite.png
|_ index.html
My vector file is in the folder c:\mbtiles\country.mbtile
I next did the following modifications in style-cdn.json file-
"url": "http://localhost/tileserver-php/tileserver.php?/mbtiles/country.json"
"sprite": "http://localhost/sprite"

When I open in a browser the link http://localhost/osm-bright/index.html, it shows a jagged map and no internal details.
Can someone help me resolve the problem ?
Thanks and my sincere apologies if this is not the right place to pose user questions.
best regards
nishith

You have a right folder structure. In style file, you have to point to change URLs. Url in "source" "openmaptiles" to tileserver-php e.g: localhost/tileserver-php/country.json. Url for sprites to a local directory and also fonts might be changed. If you have "jagged" map there might be problem somewhere else so we need screenshots to detect the problem