本文简要介绍 python 语言中 arcgis.mapping.MapImageLayer.create_dynamic_layer
的用法。
用法:
create_dynamic_layer(layer)
返回:
FeatureLayer
或无(如果未启用)
create_dynamic_layer
方法创建一个动态层。动态图层/表格表示由ArcGIS 服务器发布的Map服务或已注册工作空间的单个图层/表格。仅当Map图像图层支持动态图层时才支持此资源,如Map图像图层属性上的supportsDynamicLayers
所示。Parameter
Description
layer
必需的字典。动态层/表源定义。
用法:
{“id”: <layerOrTableId>,“source”: <layer source>, //required“definitionExpression”: “<definitionExpression>”,“drawingInfo”:{“renderer”: <renderer>,“transparency”: <transparency>,“scaleSymbols”: <true,false>,“showLabels”: <true,false>,“labelingInfo”: <labeling info>},“layerTimeOptions”: //supported only for time enabled map layers{“useTime” : <true,false>,“timeDataCumulative” : <true,false>,“timeOffset” : <timeOffset>,“timeOffsetUnits” : “<esriTimeUnitsCenturies,esriTimeUnitsDays,esriTimeUnitsDecades,esriTimeUnitsHours,esriTimeUnitsMilliseconds,esriTimeUnitsMinutes,esriTimeUnitsMonths,esriTimeUnitsSeconds,esriTimeUnitsWeeks,esriTimeUnitsYears |esriTimeUnitsUnknown>”}}例子:
# USAGE EXAMPLE >>> from arcgis.mapping import MapImageLayer >>> from arcgis.gis import GIS # connect to your GIS and get the web map item >>> gis = GIS(url, username, password) >>> map_image_item = gis.content.get("2aaddab96684405880d27f5261125061") >>> layer_to_add ={ "id": <layerId>, "source": <layer source> "definitionExpression": "<definitionExpression>", "drawingInfo": { "renderer": <renderer>, "transparency": <transparency>, "scaleSymbols": <true>, "showLabels": <true>, "labelingInfo": <labeling info> }, "layerTimeOptions": { "useTime" : <true,false>, "timeDataCumulative" : <true>, "timeOffset" : <timeOffset>, "timeOffsetUnits" : "<esriTimeUnitsCenturies>" } } >>> new_layer = map_image_item.create_dynamic_layer(layer= layer_to_add) >>>type(new_layer) <arcgis.features.FeatureLayer>
相关用法
- Python ArcGIS MapImageLayer.find用法及代码示例
- Python ArcGIS MapImageLayer.identify用法及代码示例
- Python ArcGIS MapImageLayer.export_map用法及代码示例
- Python ArcGIS MapImageLayer.fromitem用法及代码示例
- Python ArcGIS MapImageLayerManager.update_tiles用法及代码示例
- Python ArcGIS MapImageLayerManager.delete_tiles用法及代码示例
- Python arcgis.mapping.MapImageLayerManager.import_tiles用法及代码示例
- Python ArcGIS MapImageLayerManager.edit_tile_service用法及代码示例
- Python ArcGIS MapView.update用法及代码示例
- Python ArcGIS MapView.layers用法及代码示例
- Python ArcGIS MapView.basemap用法及代码示例
- Python ArcGIS MapView.center用法及代码示例
- Python ArcGIS MapView.save用法及代码示例
- Python ArcGIS MapServiceLayer用法及代码示例
- Python ArcGIS MapView.scale用法及代码示例
- Python ArcGIS MapView.rotation用法及代码示例
- Python ArcGIS MapFeatureLayer.time_filter用法及代码示例
- Python ArcGIS MapFeatureLayer.query用法及代码示例
- Python ArcGIS MapView.zoom用法及代码示例
- Python ArcGIS MapTour用法及代码示例
- Python ArcGIS MapView.sync_navigation用法及代码示例
- Python ArcGIS MapView.extent用法及代码示例
- Python ArcGIS MapView.add_layer用法及代码示例
- Python ArcGIS MapTable.fromitem用法及代码示例
- Python ArcGIS MapView.clear_graphics用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.mapping.MapImageLayer.create_dynamic_layer。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。