the RAMP instance
Readonly
$iThe instance of RampMap API scoped to a single Vue R4MP application.
Indicates if the map has been created
The internal esri map view. Changes from outside of RAMP may break the instance. Use caution.
Any map labels defaulting
Map wide defaults for layer times. Layers can override.
The instance of Vue R4MP application controlled by this InstanceAPI.
This is just a shorthand for this.$iApi.$vApp
.
Returns if keys are active on map
Returns if map focus is caused by mouse click
A promise that resolves when the map view has been created
Protected
abstractRegisters a layer with the instance and attempts to add it to the the map. The return value provides an async indicator if the map add was successful, but the layer is registered regardless. Optionally can specify the layer order index for map layers.
the Ramp layer to add
optional order index to add the layer to
a promise that resolves when the layer has been added to the map
Protected
applyProtected
Sets the basemap to the basemap with the given id or the basemap object Throws error if basemap could not be found
the basemap id or object
Will generate the actual Map control objects and construct it on the page
the config for the map
the div to be used for the map view
Protected
createProtected
Will generate a ESRI map view and add it to the page Can optionally provide the basemap or basemap id to be used when creating the map view
Optional
basemap: string | Basemapthe id of the basemap that should be used when creating the map view
Protected
destroyProtected
findFinds the tile scale (level of detail) closest to the provided scale. If using a map with no scale levels, will return the given scale.
scale value to search for in the levels of detail
the level of detail scale closest to the input
Get the top-most graphic at the given screen point Returns undefined if there is no graphic
The screen coordinates to inspect
resolves with topmost graphic or undefined
Provides the spatial reference of the map
the map spatial reference in RAMP API format
Utility method to insert a Map Layer into the ESRI map. The position in ESRI map is derived from global order and what layers are currently in the map.
the RAMP layer to insert. Must be a Map layer
Get a pixel in screen co-ordinates corresponding to a point in map co-ordinates.
point on the map
the screen point analagous to the map point
Protected
noReloads the map with the given map config and target div
the config for the map
the div to be used for the map view
Removes a layer from the map and fires the layer remove event. This will also unregister the layer from the Ramp instance.
the Ramp layer or layer id/uid to remove
a promise that resolves when the layer has been removed from the map
Removes a sublayer from the map
a promise that resolves when the layer has been removed from the map
Reorders a layer on the map. The position is based on the instance layer order state maintained by the LayerAPI. If ignoreCosmetic is set, the index changes to a different basis. Essentially the as if cosmetic layers did not exists in the layer order state.
the RAMP layer to be moved. If a sublayer is passed, the parent will be reordered.
the RAMP layer index where the layer will be moved to
indicates if the index should ignore cosmetic layers
Performs an identify request on all layers that support identify, and combines the results.
results of the identify
Get a point in map co-ordinates corresponding to a pixel in screen co-ordinates.
pixel screen co-ord of the point on the map
the map point analagous to the screen point
Set the map's basemap to the basemap with the given id. If the new basemap's tile schema differs from the current one, the map view will be refreshed
The returned boolean indicates if the schema has changed.
the basemap id
indicates if the schema has changed
Set's the map's mapMouseThrottle value to newThrottle. If newThrottle is not a positive number, a console error is thrown.
The returned boolean indicates if the value has been successfully set.
the new mapMouseThrottle value, which must be a positive number
indicates if the value was set successfully
Set's the map's pointZoomScale value to newScale. If newScale is not a positive number, a console error is thrown.
The returned boolean indicates if the value has been successfully set.
the new pointZoomScale value, which must be a positive number
indicates if the value was set successfully
Create a screenshot of the current view.
Possible ESRI takeScreenshot() options: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#takeScreenshot Will default to quality = 1 and format = 'png'.
ESRI takeScreenshot() options
a promise that resolves with a Screenshot
Zooms the map to a given geometry.
A RAMP API geometry to zoom the map to
Optional
scale: numberAn optional scale value of the map. Is ignored for non-Point geometries
Optional
animate: boolean = trueOption to turn off the zoom animation. On by default
Optional
duration: number = 200Option to change animation duration (in milliseconds). Default of 200. Ignored if animate is off.
Optional
easing: ZoomEasing = 'ease'Option to change animation easing function. Default of 'ease'. Ignored if animate is off.
A promise that resolves when the map has finished zooming
Zooms the map to a given zoom level. The center point will not change. In the rare case where there is no basemap, this will likely do nothing
An integer matching the level of detail / zoom level the map should adjust to
A promise that resolves when the map has finished zooming
Zooms the map to the closest zoom level that will be visible for a given scale set. Does nothing if scale set is already visible for the map.
A promise that resolves when the map has finished zooming
A base class for anything requiring access to the InstanceApi and instance of Vue app controlled by it.
Export
APIScope