Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using PHP tile server from infostreams with Leaflet and Wax Connector for Leaflet to visualize my .mbtiles. I upped the source and the .mbtiles on a free hosting service.

I am getting a blank Leaflet container on my site right now. There are the zoom buttons and Leaflet attribution but no map.

When I point the browser to it gives the open_basedir restriction error. When I replace the .json URL (in java.js) with another map's .json that is uploaded on MapBox Hosting, that map shows (interactivity doesn't work though).

EDIT: Since I'm on a free hosting service, I cannot access the httpd.conf or php.ini file. Therefore I have no way of suppressing the open_basedir error. I could use another free hosting service of your choice.

Server directory looks like:

DIR tiles
DIR wax

index.html goes:

<!DOCTYPE html>

<script src='wax/ext/leaflet.js' type='text/javascript'></script>
<script src='wax/dist/wax.leaf.js' type='text/javascript'></script>
<link href='wax/ext/leaflet.css' rel='stylesheet' type='text/css' />
<link href='css.css' rel='stylesheet' type='text/css' />


<div id="map-div"></div>

<script src="java.js" type='text/javascript'></script>


java.js goes:

var url = "/tiles/Century.json"
wax.tilejson(url, function(tilejson) {

// Create map and add image tiles
var map = new L.Map('map-div')
    .addLayer(new wax.leaf.connector(tilejson))
    .setView(new L.LatLng(51, 0), 1);

// Create map legend
wax.leaf.legend(map, tilejson).appendTo(map._container);

// Add map interaction (tooltips)


"tiles" directory:

Century.mbtiles   //This is just what I downloaded from infostreams' tile server.
share|improve this question

You may try this project instead:

It is easier to install, tested on several free web hosting providers, it can run also without .htaccess (if really required) and there are sample viewers (Leaflet, OpenLayers, OL3, Google Maps API, etc) presenting a copy&paste ready JavaScript source code for how to use the tiles in your web application.

The server supports also OGC WMTS - so the maps can be opened in QGIS or ArcGIS for Desktop.

Here is a live demo:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.