A base class for anything requiring access to the InstanceApi and instance of Vue app controlled by it.

APIScope

Hierarchy (view full)

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

APIScope

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance

    APIScope

Methods

  • Helper method for extracting binary-encoded file source from a layer config.

    Parameters

    • layerConfig: RampLayerConfig

      a ramp layer config. Should be layer type that is a binary format.

    Returns Promise<ArrayBuffer>

  • Extracts fields from csv file does no guesswork on property types and calls everything a string.

    Parameters

    • csvData: string
    • delimiter: string = ','

    Returns {
        name: string;
        type: FieldType;
    }[]

  • Fetch file data from remote URL.

    Parameters

    • url: string

      the URL to get the data from

    • fileType: LayerType

      the type of the file layer (csv, shape, or geoJson)

    Returns Promise<any>

  • Converts FlatGeobuf data to geojson.

    Parameters

    • fgbData: ArrayBuffer

      an ArrayBuffer of a FlatGeobuf file

    • maxLoadTime: number

      how long we are will permit this to run, in milliseconds

    Returns Promise<any>

    a promise resolving with geojson

  • Returns all the fields from csv file that can be possible lat/long fields

    Parameters

    • csvData: any

      the csv file data

    • delimiter: string = ','

      the delimiter in the data

    Returns {
        lat: any;
        lon: any;
    }

    • lat: any
    • lon: any
  • Convert GeoJSON to Esri json, a format that can be read by a feature layer constructor

    Parameters

    • geoJson: any

      {Object} a GeoJSON object

    • options: GeoJsonOptions

      {GeoJsonOptions} any options for the transformation

    Returns Promise<FeatureLayerProperties>

    feature layer constructor object

  • Will property convert json-based raw data (on a layer config) to a json object while respecting caching considerations.

    Parameters

    • rawData: any

      json-compatible payload from config

    • Optionalcaching: boolean = false

      if layer is concerned about caching the payload

    Returns any

    data as a Json object

  • Converts Shapefile data to geojson.

    Parameters

    • shapeData: ArrayBuffer

      an ArrayBuffer of the Shapefile in zip format

    Returns Promise<any>

    a promise resolving with geojson

  • Unzip a single zipped file.

    Parameters

    • zippedData: ArrayBuffer

      zipped file as ArrayBuffer

    Returns Promise<ArrayBuffer>

    contents of the unzipped file as ArrayBuffer