Affichage d'une couche de grille
Voici un exemple de couche de grille :
Requête POST
http://<hostname>:<port>/rest/Spatial/MappingService/maps/image.png;w=512;h=512;b=-218.166521,
-81.543143,247.208455,86.200601,EPSG:4326
Authorization: <Basic or Spectrum Token>
Exemple
{
"layers":[
{
"type":"GridLayer",
"table":{
"type":"NamedTable",
"name":"/Samples/NamedTables/WorldcapTable"
},
"style":{
"type":"GridStyle",
"inflections":[
{
"color":"blue",
"description":"",
"value":10000
},
{
"color":"yellow",
"description":"",
"value":100000
},
{
"color":"red",
"description":"",
"value":200000
},
{
"color":"green",
"description":"",
"value":500000
},
{
"color":"white",
"description":"",
"value":2000000
}
]
},
"cellWidth":{
"uom":"MILE",
"value":50
},
"valueExpression":"Cap_Pop",
"spatialExpression":"Obj",
"interpolator":{
"type":"IDWInterpolator",
"aggregationMethod":"AVERAGE",
"exponent":2,
"maxPoints":25,
"searchRadius":100
},
"inflectionCollection":{
"type":"CustomInflectionCollection",
"roundBy":1,
"inflectionMethod":"EQUAL_RANGE",
"inflectionColorBinList":{
"inflectionColorBin":[
{
"color":"RED"
},
{
"color":"YELLOW"
},
{
"color":"GREEN"
},
{
"color":"#FFD400"
},
{
"color":"#FFAA00"
},
{
"color":"#FF7F00"
},
{
"color":"#FF5500"
},
{
"color":"#FF2A00"
},
{
"color":"#FF0000"
}
]
}
},
"gridEnvelope":{
"crs":{
"type":"name",
"properties":{
"name":"epsg:4326"
}
},
"bbox":[
[
-218.166521,
-81.543143
],
[
247.208455,
86.200601
]
]
}
}
]
}
Remarque : Lorsque la collection d'inflexions est spécifiée et que le style n'est pas présent, les couleurs sont basées sur la collection d'inflexions.
Si la collection d'inflexions et le style sont spécifiés, le style est prioritaire.