arcgis ios 10.0.1 sdk 中比例尺 scale 和服务器不一致的问题。

在一个项目中有个 切片图层做底图,一个动态图层做专题图。2个图层叠加显示。

在动态图层的显示条件种和切片的比例有个对应显示的设置。即 切片图层显示到 小于某个比例的情况下,专题图层会隐藏和显示某些 在这个比例下才能显示的内容。


这个功能在rest服务 通过浏览器访问,完全正常。但是在 iphone界面上会无法正确显示。


查询arcgis的论坛,发现原因是由于 iphone的dpi  是 163 .而服务器做切片的dpi 是 96.

会引起比例尺不对应的问题。

解决办法:

设置 

AGSDynamicMapServiceLayer.dpi = 96 即可。


相关的解释如下:

http://forums.arcgis.com/threads/4247-Rendering-Labels-in-AGSDynamicMapServiceLayer?highlight=132%2F96


The labels are bigger because AGSDynamicMapServiceLayer uses the phone's resolution (163 DPI) to export maps. Other APIs that run on computers (not phones) use a smaller resolution - 96 is standard for most computer screens. Hence the difference.

The difference stems from the fact that labels are defined in point sizes (ex: Arial 10pt, etc). The graphic gurus of the world have decided that 72 points = 1 inch. But what exactly is 1 inch on a screen? Well, that depends on the screen's DPI (dots-per-inch). At 96 DPI, 1 inch = 96 dots. At 163 DPI, 1 Inch = 163 dots. So if you defined your label as 72 pt Arial, it would take up 96 dots on a map exported at 96 DPI, but it would take up 163 dots on map of 163 DPI. 163 is bigger than 96 (obviously) and so the labels are bigger.

If you like, you can change the dpi property of AGSDynamicMapServiceLayer to 96 and then the labels will have the familiar proportion you're expecting.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值