GithubHelp home page GithubHelp logo

Comments (10)

stevenhorner avatar stevenhorner commented on September 10, 2024

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.

dankarran avatar dankarran commented on September 10, 2024

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.

klokan avatar klokan commented on September 10, 2024

Can you try to render some maps with http://www.maptiler.com/ and include the tile folder there?

from tileserver-php.

klokan avatar klokan commented on September 10, 2024

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.

dankarran avatar dankarran commented on September 10, 2024

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.

pankus avatar pankus commented on September 10, 2024

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.

klokan avatar klokan commented on September 10, 2024

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.

pankus avatar pankus commented on September 10, 2024

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.

pankus avatar pankus commented on September 10, 2024

... 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.

klokan avatar klokan commented on September 10, 2024

The V1 has been merged to the master.

@pankus:

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.