Tiled map servics - How does it work ?

671
3
Jump to solution
10-23-2012 10:16 PM
AndrzejGórski
New Contributor
Hello,

I have tile map service with some tiles defined like below (part):

level = 4; scale = 500000;
level = 5; scale = 250000;
level = 6; scale = 100000;

When I am zooming near scale 250000 or exactly zoom to scale 250000 i see that map requests for tile 6 !! with is defined for scale 100000. I checked with other scales and tile's level is always one more than I would expected.

After some tests I noticed that on iPads (no matter which version) inluding simulator requesting tile level is 5 - and that is ok. But on all iPhones (except iphone5 - didn't test) including simulator requesting level is still 6. There must be some error in SDK.

It can be easily verified even on sample attached to installation package of SDK for iOS.

Does anyone know why is it happen ? Any ideas ?
best regards
Andrzej
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
Are you measuring map scale from self.mapView.mapScale property?

The map scale is different on the device then what you've set in the tiled map service. It is directly proportionate to the dpi/ppi. Your tiled map service scale are calculated at 96 dpi but your iPhone and iPad dpi/ppi are 163 (non-ratina) and 132 (non-ratina) respectively. So the map scale on iPhone and iPad are "scale on level * 163/96" and "scale on level * 132/96" respectively.

If you set layer's renderNativeResolution property to YES then it's going to be "scale on level * 326/96" and "scale on level * 264/96".

So the request are being sent accordingly.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
3 Replies
AndrzejGórski
New Contributor
hello again,

after many hours wasted�?�

I Have defined tiles like below

* level = 3; scale = 1000000;
* level = 4; scale = 500000;
* level = 5; scale = 250000;
* level = 6; scale = 100000;

I tested the same app on iPhone and on iPad requests which are generating when map scale is changing, and results are very strange:

a) iphone

tiles for level 4 were requesting when scale was
from: 1273437
to: 636719 

tiles for level 5 were requesting when scale was
from:  636718
to:  297136

tiles for level 6 were requesting when scale was
from: 297135
to: not checked

b) ipad/ iPhone sim on ipad

tiles for level 4 were requesting when scale was
from: 1031250
to: 515626 

tiles for level 5 were requesting when scale was
from: 515625
to: 240626

tiles for level 6 were requesting when scale was
from: 240625
to: not checked

is it possible, that there are any parameter in map control or tile layer (or somewhere else)  which default value is incorrect and must be set to correct one? or is this just bug ?

best regards
Andrzej
0 Kudos
NimeshJarecha
Esri Regular Contributor
Are you measuring map scale from self.mapView.mapScale property?

The map scale is different on the device then what you've set in the tiled map service. It is directly proportionate to the dpi/ppi. Your tiled map service scale are calculated at 96 dpi but your iPhone and iPad dpi/ppi are 163 (non-ratina) and 132 (non-ratina) respectively. So the map scale on iPhone and iPad are "scale on level * 163/96" and "scale on level * 132/96" respectively.

If you set layer's renderNativeResolution property to YES then it's going to be "scale on level * 326/96" and "scale on level * 264/96".

So the request are being sent accordingly.

Hope this helps!

Regards,
Nimesh
0 Kudos
AndrzejGórski
New Contributor
Hello Nimesh,

Few days ago I discovered relationship between scale (mapView.mapScale) and  service/device resolution ratio !! But I wasn't sure if I was wrong or right. So Your answer is great confirmation of my thoughts and work.

Thanks again and best regards
Andrzej
0 Kudos