arcgis ios 10.0.1 sdk 中比例尺 scale 和服务器不一致的问题。
2013-07-09 00:44
155 查看
在一个项目中有个 切片图层做底图,一个动态图层做专题图。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.
在动态图层的显示条件种和切片的比例有个对应显示的设置。即 切片图层显示到 小于某个比例的情况下,专题图层会隐藏和显示某些 在这个比例下才能显示的内容。
这个功能在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.
相关文章推荐
- 使用OSS JavaScript的sdk进行web端直传,开发环境下测试没有问题,但部署到服务器上或者打包到IOS原生包中出现了问题。
- 关于ArcGIS Runtime SDK for iOS中AGSLayerDefinition使用日期类型字段过滤的问题
- IOS 使用 ArcGis sdk 在iphone 6P上无法显示 AGSDynamicMapServiceLayer 图层的问题
- IOS 接入环信SDK3.0时遇到的问题
- iOS 中支付宝 ’openssl/asn1.h' file not found问题 和 objc-class-ref in AlipaySDK问题解决方法
- 八、ArcGIS Runtime SDK for iOS 100.2.1教程系列之双地图联动
- android 关于发起不同网络请求与服务器session不一致问题
- 关于arcgis 9.3 Java服务器发布服务问题
- ArcGIS Runtime SDK for iOS开发-展示callout
- 使用ArcGIS API for ios开发时的一些经验与问题
- 解决eclipse中设置SDK路径时ADT和SDK版本不一致问题
- ArcGIS Runtime SDK for iOS开发系列教程(2)——MapViewDemo解析
- ios CGAffineTransformScale缩放 中心点问题
- ADT和SDK版本不一致导致的问题
- iOS SDK开发时,有关OC和C++混编造成其它类错误的问题(Compile Sources As Objective-C++)
- ArcGIS Runtime SDK for iOS开发系列教程
- xcode6.3加入iOS 7.1SdK后,iphone5s模拟器 屏幕高度只有480的问题
- iOS开发解决使用融云sdk融云头像问题第二版 (终结了 完美)
- 关于过芝麻信用 sdk 相关问题 iOS
- [HAXE] haxe接入IOS版FacebookSdK以及iOS开发遇到的问题总结(一)