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.

OpenLayers map is requesting tiles out of range and all the map is pink. If I inspect single tile, the address is next:

/Tiles/15/16384/16384.png

But the folder with generated tiles does not contain such values: The range is only: /Tiles/15/16099 - /Tiles/15/16119

The tiles are generated by Maperitive. Is it a Maperative problem or I should set additional options to OpenLayers.Map?

map = new OpenLayers.Map("demoMap");
var cLayer2 = new OpenLayers.Layer.OSM("New Layer", 
"http://localhost:15157/Map/Tiles/${z}/${x}/${y}.png", { numZoomLevels: 19 });
map.addLayer(cLayer2);
map.zoomToMaxExtent();
share|improve this question
add comment

1 Answer 1

The problem was resolved. The reason was in differences between Maperitive and OpenLayers coordinates. lon lat point in maperitive is not the same point on the map, that's why the map was requesting out of range tiles.

I generated my tiles with zoom levels 2-18 and they were displayed on the map.

share|improve this answer
    
Hi Jesse, I see that you're new. It's acceptable/encouraged that you "accept" your own answer, that way it doesn't show up as unanswered later. –  canisrufus Nov 16 '12 at 15:15
    
@Jesse, can you elaborate on "lon lat point is not the same point on the map"? I'm the author of Maperitive, BTW. –  Igor Brejc Nov 16 '12 at 16:54
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.