serializeSpatialReference

Function

Puts a spatial reference into a serialized format that can be used for item typeKeywords.

Note: discards "latestWkid"

In the past we used JSON.stringify, but that causes problems because it can include commas which are interpreted by the portal update item call as being separate typekeywords. With JSON.stringify, equality was also dependent on the order of the properties in the spatial reference.

Check https://developers.arcgis.com/web-map-specification/objects/spatialReference/ for more details on what this object looks like.

  • serializeSpatialReference(spatialReference: ISpatialReference | string) : string

Parameters

Parameter Type Default Notes
spatialReference Required ISpatialReference | string

Returns

string

Function defined in common/src/downloads/build-existing-exports-portal-query.ts:66