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.

I have set up a basic PostGIS / Tilestache / gunicorn / nginx / Polymaps test environment, rendering my dataset from PostGIS to GeoJSON and shipping it out to be rendered in Polymaps.

That works nicely, but for one small detail: Polymaps seems not to be requesting all tiles.

If my dataset encompasses a world map, at zoom level 0, it requests 0/0/0.geojson, but not 0/1/0.geojson (the Eastern hemisphere). If I zoom further into the visible dataset, the right halves of it seem to disappear.

With a more local dataset (Norway, display centered around lat/lon 60/10) nothing at all is displayed. One correct tile to load and display would for example be 2/4/0.geojson, which spans the whole dataset. Polymaps never loads any tile with an index above 3.

If I load the tile directly, ignoring the tiling scheme, it is loaded and displayed correctly.

Any clues to what I am missing? Polymaps code below:

var po = org.polymaps;

var map = po.map()
.container(document.getElementById("map").appendChild(po.svg("svg")))
.center({lat: 60, lon: 10})
.zoomRange([0, 20])
.zoom(10)
.add(po.interact())
.add(po.hash());

loading the tiled layer:

map.add(po.geoJson() 
.url("/boundary/{Z}/{X}/{Y}.geojson")
.id("boundary")
.on("load", loadFeature))

loading the one tile directly (works):

map.add(po.geoJson()
.url("/test.geojson")
.id("boundary2")
.on("load", loadFeature))
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Ok, got it myself - the tiling scheme mismatch was between WSG84 in tilestache and spherical mercator in Polymaps.

share|improve this answer
add comment

Your Answer

 
discard

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.