Comments (10)
I get the same error when trying to load up the webpage, but like you it works fine in QGIS (other than printing but that's a separate issue).
My setup is on Windows, yours looks like Linux from the paths so can't be specific to your setup. Are you sure the PHP warnings are related to the same error, I was getting those and realised the Tileserver at least for the webpage was expecting the map tiles to be in a folder called tileserver:
(http://SERVER/tileserver/tileserver/z/x/y.png)
I previously had my files stored in:
http://SERVER/tileserver/xyz/z/x/y.png
Either worked fine for WMTS but the web version was giving me those same PHP errors once I change the maptile folder to tileserver that error went away.
I still have the same error in chrome though:
Uncaught TypeError: Cannot read property '0' of undefined (tileserver.js:123)
The top section of the page appears with TileServer image and "Maps served from pre-rendered Tiles" text in a Blue header section. The other sections don't load, even though I can view some HTML source.
from tileserver-php.
I'm seeing the same problem:
TypeError: 'undefined' is not an object (evaluating 'k[0]') on line 123 of tileserver.js
And also missing any maps or text from the web interface except for the blue header and its contents.
from tileserver-php.
Can you try to render some maps with http://www.maptiler.com/ and include the tile folder there?
from tileserver-php.
Strange - it seems like a bug if there is only one dataset: see http://liber.isma.cnr.it/tileserver-php/tileserver.json
There should be a list returned - similar to http://tileserver.maptiler.com/tileserver.json
Please try to add a second file. Patch for this is welcomed - may be relatively trivial. If nobody provides the patch I will fix it later...
from tileserver-php.
I tried with a MapTiler tileset, and also tried with more than one, but still saw the same issues.
I'm not sure if it's the right fix, but I've made it work with the following little patch:
dankarran@b7357d1
from tileserver-php.
yes! dankarran's patch works on my server as well.
N.B. as for dankarran, I tried to load several MapTiler tiles as well (both mbtiles and folders), but the web page issue still existed.
from tileserver-php.
Hopefully, we have a proper solution of the issue #7 in the new version of TileServer.php.
Could you please try it?
You can get it in the branch "v1", until it is merged into "master".
Direct download (before it is released officially) is at:
https://github.com/klokantech/tileserver-php/archive/v1.zip
The new tileserver is detecting path automatically - so this and similar reported problems should be prevented by now. The list of all map layers is now in /index.json file.
If there are no issues reported on the "v1" we will make it stable and close this issue.
from tileserver-php.
well done and thank you for this great job!
After some test, I believe this solution solved issue #7.
Just a question: the fact that the new tileserver detects path automatically also means that "global $config" in tileserver.php (l.10) must be kept unaltered, isn't it?
And a small bug(?) as well: I experienced a minor issue with mbtiles with an underscore character in their names (es. map_new.mbtiles). In these cases, tiles are not shown because browsers misunderstand path and answer "Resource interpreted as Image but transferred with MIME type text/html". By stripping "illegal" characters off, tileserver works properly. Is it an .htaccess issue?
from tileserver-php.
... and lastly.
This new branch requires, at least for my apache configuration, to remove MultiViews from Virtual Host config file. With MultiViews enabled my server error.log reports "Request: None Could Be Negotiated" and the program doesn't work at all.
Thank you again; I hope the issues I met may help you improve this amazing peace of sotware
from tileserver-php.
The V1 has been merged to the master.
the fact that the new tileserver detects path automatically also means that "global $config" in tileserver.php (l.10) must be kept unaltered, isn't it?
You can use the $config variable to enforce some of the settings (esp. multiple domain names of your server, etc.). Autodetection is used only if you don't modify the $config variable (the required values are missing).
mbtiles with an underscore character in their names (es. map_new.mbtiles)
Fixed in ed56188
remove MultiViews from Virtual Host config file
This is prepared and documented in .htaccess
from tileserver-php.
Related Issues (20)
- mbtiles from QGIS? HOT 5
- Apache 2 - php 7.2.19 - getting warning / array dump vs loading page HOT 1
- GDAL2Tiles? HOT 1
- Running tileserver-php via Docker on Windows using a bind mount volume makes filemtime() return 0
- localhost MBTiles HOT 3
- map.js erro HOT 1
- When the file is updated, we can reload the file make it work without a restart HOT 1
- Tiles like à la Google Maps HOT 3
- PBF serving in non-root directory not working
- wmts problem with arcmap HOT 2
- Chinese file name
- Valid KVP getTile Requests respond with a GetCapabilities document
- urn:ogc:def:crs:EPSG:6.18:3:3857 is wrong and should be urn:ogc:def:crs:EPSG:6.18.3:3857 HOT 1
- Map Tiles working on localhost but not from remote computer
- Question: has anyone ever tried to convert a osm.pbf to MBtiles and produced a map? using tippecanoe ogr2ogr
- All maps Invisible HOT 4
- Trying to get in touch regarding a security issue
- support arcgis tile package? HOT 2
- JSON metadata file is not valid. Please check configuration of your server. HOT 1
- Tile folder xyz
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tileserver-php.