本文簡要介紹 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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。