RAMP4 - v4.23.0-beta
    Preparing search index...

    Class GeoAPI

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

    APIScope

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

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

    APIScope

    attributes: AttributeAPI
    layer: LayerAPI
    map: MapAPI
    query: QueryAPI
    symbology: SymbologyAPI

    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

    • get proxy(): string

      Read the current proxy setting, returns url string, empty string if no proxy

      Returns string

    • set proxy(proxyUrl: string): void

      Set a proxy service to allow consumption of cross-domain non-CORS resources.

      Parameters

      • proxyUrl: string

        Url to proxy or empty string to clear. Must be relative url on host domain, or full url to CORS supported server

      Returns void

    Methods

    • Gets the geolocation of the user's browser. May prompt the user for permission. Will also emit event 'map/geolocate' when done.

      Parameters

      • OptionalhideFailNotification: boolean = false

        option to suppress a RAMP notification if the request fails

      Returns Promise<GeolocationResult>

      resolves with an object containing the these properties: - success (boolean) - coord (Point) location in lat lon if successful - error ('permission' | 'internal') if not successful, indicates if it's a permission problem or something else