日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ArcGIS API for Silverlight中legend控件显示图例问题

發(fā)布時(shí)間:2025/3/15 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ArcGIS API for Silverlight中legend控件显示图例问题 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

轉(zhuǎn)自http://www.gisall.com/html/34/9534-5141.html

在使用ArcGIS API for Silverlight進(jìn)行地圖展示應(yīng)用的時(shí)候,我們都會(huì)設(shè)置地圖圖層列表的圖例(該圖例包含有圖層名稱和圖層符號(hào)),但是在使用API時(shí)卻出現(xiàn)了圖例無法正常顯示,該圖例只顯示了圖層名稱,卻無法顯示圖層的符號(hào)顏色的問題。查看ArcGIS API for Silverlight的接口說明,沒任何說明。但是在ArcGIS API for Flex的接口說明確發(fā)現(xiàn)如下信息:

The Legend component displays labels and symbols for some or all of the layers in the map. By default the legend will respect scale dependencies and only display layers and sublayers that are currently visible in the map. Optionally, you can set the respectCurrentMapScale property to false to show all layers at all scales, then layers that are not in scale will be shown - with 50% transparency. The legend automatically updates if the visibility of a layer or sublayer changes.

The legend supports the following layer types: ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, and FeatureLayer. If the layer is an ArcGISDynamicMapServiceLayer or ArcGISTiledMapServiceLayer created using ArcGIS Server 10.0 SP1 or higher the legend is generated using the REST Map Service legend resource of that service, e.g. http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Unemployment_Rate/MapServer/legend. If the layers are version 10 or lower the legend is created using the ArcGIS.com legend service. In order to use the ArcGIS.com legend service your map service needs to be publicly accessible and your application must be able to access ArcGIS.com.

The legend for feature layers is created using the layer's drawing info, for example: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/MapServer/0.

通過上述描述我們發(fā)現(xiàn)導(dǎo)致這個(gè)問題的原因是因?yàn)槭褂肁rcGIS Server10版本或更低的發(fā)布地圖服務(wù)(靜態(tài)或動(dòng)態(tài)類型)是不能使用ArcGIS API for Silverlight的Legend控件進(jìn)行圖例顯示,但是使用FeatureLayer類型卻可以正常顯示圖例.

而要正常顯示本地靜態(tài)或動(dòng)態(tài)類型的地圖服務(wù)則需要將ArcGIS Server10版本打補(bǔ)丁到SP1或以上版本就可以實(shí)現(xiàn)了。

轉(zhuǎn)載于:https://www.cnblogs.com/holygis/archive/2012/12/27/2835977.html

總結(jié)

以上是生活随笔為你收集整理的ArcGIS API for Silverlight中legend控件显示图例问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。