3

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();

1 Answer 1

2

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.

2
  • 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
    Commented Nov 16, 2012 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
    Commented Nov 16, 2012 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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