Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 domain.com/tiles/tileserver.php 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
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


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

Browse other questions tagged or ask your own question.