2

If I'm using MapTiler to tile a raster image it seems to always provide a OL3 code that only uses resolutions of 2. I've tried to figure out how it does it, but I can't seem to find a formula for finding the right amount of tiles for each zoom level.

How should I calculate the resolution/tiles number for a zoom level? Also, what exactly do those resolutions mean for a XYZ layer with "PIXELS" projection?

Edit due to comment

At first, I though that maybe it's the code that needs more adjusting. So I played for hours with the projection, tilePixelRatio, extents and so on. After some time I decided to try to tile more images with MapTiler cause they seemed to only change the extent to the size of the picture.

After adding some borders ( full alpha ) to the pictures so they are square I tried a lot of resizing and cropping but none seemed to work the way I wanted : I tried doing a 100% 50% 25% 12.5% zoom levels, didn't work. I tried making both sizes multiples of 256px and then chosing some sizes, keeping in mind the aspect ratio, didn't work, only used sizes that are multiples of 2, did work the but difference between zoom levels was too high.

I have been trying to solve this problem for about 5 days now. As for the problem itself, is that when I open the map, I either get the wrong tiles when I zoom in/out, only part of the picture shows and it's kinda "stuck".

Since MapTiler always seems to use the same way to calculate resolutions, I took a wild guess and said that the way I'm tiling my image is wrong. Or better said, the way the resolutions are adjusted to my tiling is wrong. Solutions would be to either fix the resolutions or the tiling, the second one seems easiest to fix.

I'm a little bit lost, can't seem to find any good documentation or solutions for this problem.

2
  • Can you show examples of what you're expecting, and what you've tried? Nov 23, 2015 at 20:19
  • @emcconville It's a bit hard to show specific examples of what I tried since they are just folders with a bunch of files. I wanna get something like google maps , using tiled images, but with more custom resolutions.
    – taigi100
    Nov 23, 2015 at 20:43

0

Your Answer

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

Browse other questions tagged or ask your own question.