Workspace templates
map.apps ETL requires a published FME workspace for every ETL tool. Even though almost all formats can be used, a few basic requirements are necessary for workspaces to be used in map.apps ETL.
The following templates are provided with map.apps ETL:
Template | Use case | FME service | App configuration |
---|---|---|---|
extent_download.fmw |
|
Data Download Service |
|
map_features_download.fmw |
|
Data Download Service |
|
upload_to_map.fmw |
|
Data Streaming Service |
|
schema_analyzer.fmw |
|
Data Streaming Service |
|
Map output
If features should be drawn on the map, the output always has to be a JSON document with the following structure:
{
"layers": [
// Multiple individual layers are possible. Each layer has to consist of only one geometry type (point, line, area)
// See EsriJSON Layer for more details
],
//Optional
"errors":[
// multiple error messages are possible
{
// "msg" refers to a key in the i18n configuration (parent key: transformationErrors). If missing in i18n, it will be used as the error message in the gui.
// defaults are: NO_FEATURE_WRITTEN,FILE_COULD_NOT_BE_READ,TOO_MANY_FEATURES
"msg": "FILE_COULD_NOT_BE_READ",
"detail": "corrupt_shape.shp"
}
],
// Optional: This object can contain HTML code (e.g. through FME HTMLReportGenerator Transformer) that will be opened as a new tool windows in map.apps in an iFrame.
"message": ""
}
EsriJSON layer
{
// EsriJSON representation of a feature. Can be created using an EsriJSON Writer or the CreateEsriJsonLayer Custom Transformer from the map.apps ETL templates
"RecordSet" : {
"geometryType" : "esriGeometryPolygon",
"spatialReference" : {
"wkid" : 3857
},
"features" : [
{
"geometry" : {
"hasZ" : true,
"hasM" : false,
"rings" : [
[
[ 848483.3378490285, 6792708.083335426, 0 ],
[ 848754.450433705, 6792945.754720229, 0 ],
[ 848981.3728614079, 6792589.844807314, 0 ],
[ 849217.8499176458, 6792462.051650667, 0 ],
[ 848834.4704476842, 6792385.61462239, 0 ],
[ 848483.3378490285, 6792708.083335426, 0 ]
]
],
"spatialReference" : {
"wkid" : 3857
}
},
"attributes" : {
"myAttribute1" : "hi",
"myAttribute2": 1
}
}
]
},
// Can be any esri renderer from https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-Renderer.html
// You can use the Custom Transformer "EsriJsonRenderer" form the map.apps ETL Templates to create renderers.
"renderer" : {
"type" : "simple",
"symbol" : {
"type" : "simple-fill",
"size" : 8,
"color" : [ 0, 112, 191, 0.65 ],
"outline" : {
"width" : 1,
"color" : [ 256, 256, 256, 0.65 ]
}
}
},
// Name will be used as the layer title in the map.apps TOC
"name" : "My custom layer name",
// Optional: Labeling Information. Replace "NAME" for the attribute you want to display.
// For more configuration details: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoJSONLayer.html#labelingInfo
"labelingInfo": [{
"labelPlacement": "below-center",
"labelExpressionInfo": {
"expression": "$feature.NAME"
},
"symbol": {
"type": "text",
"font": {
"size": 10,
"wheight": "bold"
},
"color": "black"
}
}]
}
More information see JSON specification for geometries .