[GIS] PHP tile server

PHPweb-mapping

I am newbie in PHP. I am using tileserver.php to serve my *.mbtiles as web map. I have configure it and when I am trying to access the localhost it replying like following
enter image description here

Now please help me to visualize the available map in browser. What should I do to visualize the map in browser?

I have tried the following codes with OpenLayers

    <html>
<head>
  <title>OpenLayers Example</title>
    <script src="http://openlayers.org/api/OpenLayers.js"></script>
    </head>
    <body>
      <div style="width:100%; height:100%" id="map"></div>
      <script defer="defer" type="text/javascript">
        var map = new OpenLayers.Map('map');
        var TMS = new OpenLayers.Layer.TMS( "MBTiles Overlay",
            "http://localhost:8080/tileserver/DHK_17/", {layers: 'basic'} );
        map.addLayer(TMS);
        map.zoomToMaxExtent();
    map.setCenter(new OpenLayers.LonLat(23.81, 90.40),17);
      </script>
</body>
</html>

Best Answer

This is just a tile server, its purpose is just to serve tiles. You will need a mapping application to access the tiles, something like OpenLayers, Google Maps, LeafletJS. You then tell your mapping API to use tileserver.php to get tiles at the address described in the documentation at github. Github Readme

You should never have to directly access tileserver.php.

Though, nice project, never seen it before. Probably will have to come up with a project to use it...

Because of your earlier question: https://gis.stackexchange.com/questions/42217/creating-tile-server-without-using-any-base-map. My answer needs to be clarified.

Using something like OpenLayers or Leaflet you don't have to use OSM's or Cloudmade's tile service. These applications just provide the framework for developing map applications. You don't have to use any tile service if want (thought it could be hard to read); you could create custom tiles for Middle Earth and use them. There isn't a 'lock-in' on these mapping applications, you can do what you will with them.

In-fact reading from what are asking in these two questions I either don't understand your question or you don't understand the difference between the two systems. Think of it as layers built upon on another.

First you have the tile service, this is the 'map' as most people think of the, tile servers provide tiles that have streets, lakes, parks, etc on them. If you asked the tile servers for their tiles without a mapping application it would just hand you back a bunch of unorganized tiles that wouldn't help you much.

This is where a mapping application like Google Maps, Open Layers, and Leaflet come in. They take all those jumbled tiles, arrange them, stitch them together, and give your controls so you can zoom and pan. All three of these mapping APIs do provide a tile service so you don't HAVE to go looking for tile service, but they do not restrict you from doing so.

As I said, you can create your own tiles, your own 'map', and serve it with tileserver.php. This can be anything you want it to be. In fact you can see this here which uses Google Maps API but is used for creating a 'slippy-map' of World of Warcraft's fantasy-land, Azeroth. ...And yes I do play...