TileServer help required with endpoint URLs

30 views
Skip to first unread message

Gary

unread,
Oct 29, 2018, 12:41:45 PM10/29/18
to MapTiler Community
OK - I have downloaded TileServer PHP and I am trying to use it on my tiled output from MapTiler.
My index is page looks like:




[PARENTDIR]    Parent Directory         -      
[ ]    README.md    2018-07-02 10:45     11K     
[ ]    kenya.mbtiles    2018-10-23 17:00     103M     
[DIR]    texasTiles/    2018-10-23 16:28     -      
[ ]    tileserver.php    2018-07-02 10:45     42K     
[DIR]    uk50kTiles/    2018-10-24 18:44     -

If I click on texasTiles or uk50kTiles (simple tile folders) then I get my map shown on the TileServer page with all the different map clients on (defaulting to http://localhost:90/tileServer/texasTiles/#texasTiles/ol3).
If I specify a static file location of a specific tile - it works too (e.g. http://localhost:90/tileServer/texasTiles/7/28/51.png).

But I have been reading the README.md and paradoxically, now I'm confused.  It would suggest that for a WMTS service I should include /wmts in the URL.  That for a GetCapabilities request, I should use something like http://localhost:90/tileServer?service=wmts&request=getcapabilities&version=1.0.0.  But I can't get any of the syntax suggested in the README to work (except the direct file access).

Forgive my ignorance, but how do I make use of all the end-points in the README.md?  Or have I misunderstood something pretty fundamental and perhaps it is my duty to provide a GetCapabilities response (and not for TileServer to compute it)?

As an aside - if I click on the MBTiles file - the browser just tries to read the file.  What am I supposed to do in order to serve tiles from an MBTiles file?

Thanks in advance
Gary
















Gary

unread,
Oct 29, 2018, 1:35:26 PM10/29/18
to MapTiler Community

<html>
  <head>
    <title>texasTiles</title>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="https://cdn.klokantech.com/tileviewer/v1/index.css" type="text/css"/>
    <script src="https://cdn.klokantech.com/tileviewer/v1/index.js"></script>
  </head>
  <body>
    <script type="text/javascript">
      // var GOOGLEMAPS_KEY = 'YOUR-API-KEY';
      var data = {
        "name": "texasTiles",
        "version": "1.0.0",
        "description": "",
        "type": "overlay",
        "format": "png",
        "minzoom": "7",
        "maxzoom": "15",
        "bounds": "-98.75034081,31.00017368,-96.50023824,33.37511509",
        "scale": "1.000000",
        "profile": "mercator"
      };
      tileserver(data);
    </script>
  </body>
</html>




















MapTiler

unread,
Oct 29, 2018, 1:39:52 PM10/29/18
to MapTiler User Group
Just install the TileServer PHP properly - including the .htaccess file in Apache - and then the WMTS endpoint is available at "/wmts" on your root URL.

This is properly documented at https://github.com/klokantech/tileserver-php in README

Kind regards,

Petr
--
MapTiler Team
Twitter: @klokantech


--
You received this message because you are subscribed to the Google Groups "MapTiler Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maptiler+u...@googlegroups.com.
To post to this group, send email to mapt...@googlegroups.com.
Visit this group at https://groups.google.com/group/maptiler.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Gary

unread,
Nov 1, 2018, 5:10:32 AM11/1/18
to MapTiler Community
I know I must be stupid, but all I see 'properly documented' in the README is "Download the project files as a zip archive or source code from GitHub and unpack it into a web-hosting of your choice. Then you can upload to the web hosting your mapping data", which quite frankly meant very little to me (I am a GIS person, not a web-app person).  I am using apache2 on port 90 with php enabled (I believe the PHP works because I use a PHP proxy successfully in my other apps to avoid CORS). 

After a lot of Googling, I assumed the README was a clue that I should:
1) Create a root in the /var/www/html directory (in my case 'tileServer').
2) Copy the unzipped content of tileServer archive into that folder.
3) Then create symbolic links to my tile folders in this directory (in my case, tileServer/kenya.mbtiles, tileServer/texasTiles and tileServer/uk50kTile)
4) Then apply a sudo a2enmod rewrite
5) I also edited the /etc/apache2/mods-enabled/php7.0.conf to comment out the <IfModule mod_userdir.c>..</IfModule> lines (although I'm not sure why?)
6) Then I restarted the apache2 server - sudo /etc/init.d/apache2 restart

...and this is where I'm at!  Where did I go wrong?
Reply all
Reply to author
Forward
0 new messages