map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface Transformer

    Provides the means to transform between WKT strings, GeoJSON and @arcgis/core/Geometry objects. Registered as service geojson.Transformer.

    interface Transformer {
        geojsonToGeometry(geoJSON: Record<string, unknown>): Geometry;
        geojsonToWKT(geoJSON: Record<string, unknown>): string;
        geometryToGeojson(geometry: Geometry): Record<string, unknown>;
        geometryToWKT(geometry: Geometry): string;
        wktToGeojson(wkt: string): Record<string, unknown>;
        wktToGeometry(wkt: string): Geometry;
    }
    Index

    Methods

    • Parses the given GeoJSON object to @arcgis/core/Geometry.

      Parameters

      • geoJSON: Record<string, unknown>

      Returns Geometry

    • Converts a GeoJSON object into a WKT string.

      Parameters

      • geoJSON: Record<string, unknown>

      Returns string

    • Converts an @arcgis/core/Geometry into a GeoJSON object.

      Parameters

      • geometry: Geometry

      Returns Record<string, unknown>

    • Converts an @arcgis/core/Geometry into a WKT string.

      Parameters

      • geometry: Geometry

      Returns string

    • Parses a WKT string into a GeoJSON object.

      Parameters

      • wkt: string

      Returns Record<string, unknown>

    • Parses a WKT string into an @arcgis/core/Geometry.

      Parameters

      • wkt: string

      Returns Geometry