ArcGIS API for Javascript 4.x叫MapImageLayer
https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicmaplayer/
ArcGIS API for Javascript 3.x叫DynamicLayers
https://developers.arcgis.com/javascript/3/jssamples/map_dynamic.html(Sample)
https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html(dynamicLayer API)
1. Add Two Dynamic Layers(添加两个动态图层)
Description
Add two dynamic map services to a map and use the setInfoTemplates method to specify what information should be shown when a feature from a map service is clicked.
向地图添加两个动态地图服务,并使用setInfoTemplates方法指定单击地图服务中的某个功能时应显示哪些信息。
dynamicLayer和一般的Layer的区别是?好像现在的mapserver都是dynamiclayer了。。不用设置。。以前的mapserver好像是需要设置是否可以动态的更改。而现在不用。但是这种设置是临时的,不会修改服务器端的默认配置 [Wrong!也是需要设置的]试验:https://blog.csdn.net/nmj2008/article/details/115000401
dynamicLayer的好处:https://blog.csdn.net/u012123612/article/details/53641234用于动态变化的图层,它的好处在于不需要发布地图???这是在ArcGIS Server10.1版本之后,ArcGIS Server才提供的一种新的功能:动态图层。准确的说,动态图层并不是一种新的地图服务,它更像是地图服务(MapServer)的一种扩展。不需要将shp文件发布为服务,服务器可以直接读取shp文件在前端显示,实现拓展。既然知道动态图层并不是一种新的服务类型,而是地图服务的一种扩展,因此我们不需要发布服务,只需要对地图服务添加动态图层功能即可。启用地图服务的步骤为:。。。但是我使用动态图层的目的并不是为了扩展现有的服务。。而是。。。修改原有图层的属性或者样式。
2. Change attribute used for a renderer(更改用于渲染器的属性)
Description
This functionality requires an ArcGIS Server 10.1 service.
Dynamic layers provide the ability to change the renderer(s) for layers in a dynamic map service. In this sample, a drop-down list is populated with attribute field names for a layer that is displayed on the map using an ArcGIS Server 10.1 dynamic layer and a dynamic map service layer. When the selected field changes, a new map image is requested using the new field as the basis for the layer's renderer.
动态图层提供更改动态地图服务中图层的渲染器的功能。在此示例中,下拉列表中填充了使用ArcGIS Server 10.1动态图层和动态地图服务图层在地图上显示的图层的属性字段名称。当选定字段更改时,将使用新字段作为层渲染器的基础来请求新的地图图像。
[{
"id":10,
"definitionExpression": "OBJECTID<100",
"source": {
"type": "mapLayer",
"mapLayerId": 0
},
"drawingInfo":
{
"renderer":
{
"type":"simple",
"symbol":
{
"type":"esriSFS",
"style":"esriSFSSolid",
"color":[166,36,0,255],
"outline":
{
"type":"esriSLS",
"style":"esriSLSSolid",
"color":[110,110,110,255],
"width":1.0
}
},
"label":"TaxLots",
"description":""
},
"transparency":60
},
}
]
[{
"id":10,
"definitionExpression": "OBJECTID<100",
"source": {
"type": "mapLayer",
"mapLayerId": 0
},
"drawingInfo":
{
"renderer":
{
"type":"simple",
"symbol":
{
"type":"esriSFS",
"style":"esriSFSSolid",
"color":[166,36,0,255],
"outline":
{
"type":"esriSLS",
"style":"esriSLSSolid",
"color":[110,110,110,255],
"width":1.0
}
},
"label":"TaxLots",
"description":""
},
"transparency":60
},
},{
"id":110,
"definitionExpression": "OBJECTID<100",
"source": {
"type": "mapLayer",
"mapLayerId": 1
},
"drawingInfo":
{
"renderer":
{
"type":"simple",
"symbol":
{
"type":"esriSFS",
"style":"esriSFSSolid",
"color":[166,36,0,255],
"outline":
{
"type":"esriSLS",
"style":"esriSLSSolid",
"color":[110,110,110,255],
"width":1.0
}
},
"label":"TaxLots",
"description":""
},
"transparency":60
},
}
]
使用动态图层在服务器端渲染:http://www.voidcn.com/article/p-burbkpte-xz.html
ArcGIS API for JS之基础篇(三)可视化:https://blog.csdn.net/weixin_41665391/article/details/79342769
arcgis学习系列-4设置FeatureLayer的样式:https://blog.csdn.net/naturessdfsafagf/article/details/102516680
[AE] 渲染器RENDERER|LAYER:https://www.freesion.com/article/5718584175/
>>
[{
"id":10,
"definitionExpression": "OBJECTID<100",
"source": {
"type": "mapLayer",
"mapLayerId": 0
},
"drawingInfo":
{
"renderer":
{
"type":"simple",
"symbol":
{
"type": "esriSMS",
"style": "esriSMSCircle",
"color": [255,0,0,255],
"size":1
},
"label":"TaxLots",
"description":""
},
"transparency":60
},
}
]
https://developers.arcgis.com/javascript/3/jsapi/simplerenderer-amd.html
[
{
"id":110,
"definitionExpression": "OBJECTID<100",
"source": {
"type": "mapLayer",
"mapLayerId": 1
},
"drawingInfo":
{
"renderer":
{
"type":"simple",
"symbol":
{
"type":"esriSLS",
"style":"esriSLSSolid",
"color":[0,71,22,255],
"width":1,
"outline":
{
"type":"esriSLS",
"style":"esriSLSSolid",
"color":[110,110,110,255],
"width":0.1
}
},
"label":"TaxLots",
"description":""
},
"transparency":60
},
}
]