ArcGIS Server&ArcGIS API for JS之GenerateRenderer

ArcGIS Server&ArcGIS API for JS之GenerateRenderer

http://localhost:6080/arcgis/sdk/rest/index.html#//02ss0000001v000000

Generate Renderer (Map Service\Layer)

  • URL:http:// <layer-url>/generateRenderer
  • Required Capability:Map
  • Version Introduced:10.1

Description

generateRenderer operation is performed on a layer / table resource. This operation groups data using the supplied classificationDef (classification definition) and an optional where clause. The result is a renderer object. Use baseSymbol and colorRamp to define the symbols assigned to each class. If the operation is performned on a table, the result is a renderer object containing the data classes and no symbols.

生成渲染器是执行在layer图层/表table资源上。该操作会对数据进行分组,使用classificationDef(分类定义)和一个可选的where子句。其结果是一个渲染器对象。使用baseSymbol和colorRamp定义分配给每个类的符号。如果该操作是执行在table上,结果是一个渲染器对象,只有数据类别而没有符号。

You can provide arguments to the generateRenderer operation as query parameters defined in the parameters table below.

您可以将参数作为在下面的参数表中定义的查询参数提供给generateRenderer操作。

Note:

When generating a class breaks renderer map server uses maxSampleSize configuration property set on the map service to determine the number of records to sample. In rare cases these classes might not include the minimum or maximum value in the data.

生成类中断渲染器映射服务器时,使用映射服务上设置的maxSampleSize配置属性来确定要采样的记录数。在少数情况下,这些类可能不包括数据中的最小或最大值。

f

Description: The response format. The default response format is html.

Values: html | json

classificationDef

Description: The definition using which the parameter is generated.

 

Note:

Use either one of ClassBreaks or UniqueValue classification definition.

Syntax: classificationDef = classification definition

 

Example:

//classBreaks classification definition
classificationDef = {
  "type": "classBreaksDef",
  "classificationField": "POP2010",
  "classificationMethod": "esriClassifyNaturalBreaks",
  "breakCount": 5,
  "normalizationType": "esriNormalizeByField",
  "normalizationField": "Area"
}

//uniqueValue classification definition with symbology
classificationDef = {
  "type": "uniqueValueDef",
  "uniqueValueFields": ["Type", "AdminClass"],
  "fieldDelimiter": ",",
  "baseSymbol":
  {
    "type": "esriSLS",
    "style": "esriSLSSolid",
    "width": 2
  },
  "colorRamp":
  {
    "type": "algorithmic",
    "fromColor": [115,76,0,255],
    "toColor": [255,25,86,255],
    "algorithm": "esriHSVAlgorithm"
  }
}
上一篇:11、Java模式--装饰器模式


下一篇:Unity场景:异步加载