arcgis for android 10.2.7 ArcGISDynamicMapServiceLayer要素查询。
我想点击屏幕可以查询点击图层的详细信息,然后展现出来。
我的图层有两种,一种是ArcGISDynamicMapServiceLayer,另一种是FeatureLayer。
使用FeatureLayer的图层,可以使用:
Graphic graphic = layer.getGraphic(graphicIds[0]);
Map<String, Object> attr = graphic.getAttributes();
获取到图层上要素的详细信息。
但是ArcGISDynamicMapServiceLayer我始终找不到返回要素详细信息的方法,只能查询到详细信息的类型。
请问ArcGISDynamicMapServiceLayer如何返回要素的详细信息,或者ArcGISDynamicMapServiceLayer如何转换成FeatureLayer加载出来?
我的图层有两种,一种是ArcGISDynamicMapServiceLayer,另一种是FeatureLayer。
使用FeatureLayer的图层,可以使用:
Graphic graphic = layer.getGraphic(graphicIds[0]);
Map<String, Object> attr = graphic.getAttributes();
获取到图层上要素的详细信息。
但是ArcGISDynamicMapServiceLayer我始终找不到返回要素详细信息的方法,只能查询到详细信息的类型。
请问ArcGISDynamicMapServiceLayer如何返回要素的详细信息,或者ArcGISDynamicMapServiceLayer如何转换成FeatureLayer加载出来?
1 个回复
张赛
赞同来自:
1 在10.2.X上,通过identifyTask对服务中的所有图层进行查询;或将ArcGISDynamicMapServiceLayer中的单个层构建为ArcGISFeatureLayer,而后利用QueryTask进行查询;
2 在100.0.0版本上,则可以通过Geoview的identify方法实现对于View中所有图层的查询;或利用FeatureTable提供的queryFeaturesAsync进行查询。
要回复问题请先登录或注册