-
Notifications
You must be signed in to change notification settings - Fork 8
AnsynApi Functions
after we inject the AnsynApi service in our component we can use ansynApi
functions for change things in our app.
the id of the active map.
key-value from the map id to the mapSettings.
the active annotation layer.
the id of the active annotation layer.
Observable that emit the maps as array.
Observable that emit the position of the mouse on the map.
Observable that emit when the application layout was change.
Observable that emit when the center of the map is change from the search box or the go-to tool.
fire when the app is ready.(map was loaded)
fire when the overlays search was end. return array of overlay or false if there is no overlays.
fire when an overlay was loaded to the map. emit an
{overlay:
overlay | false, mapId: the map id}
set the map position to the point coordinate
point - a geoJson point
change the layout of the maps
layout - could be one of the follow:
layout1
- show one map.
layout2
- show 2 maps side by side horizontally.
layout3
- show 2 maps side by side vertically.
layout4
- show 3 maps, one on left and 2 smaller on the right vertically.
layout5
- show 3 maps one on top and 2 smaller on bottom horizontally.
layout6
- show 4 maps.
display the overlay on the map.
overlay - an overlay object
minimize/maximize the side menu
collapse - boolean, true for minimize false for maximize.
minimize/maximize the timeline-status-bar
collapse - boolean, true for minimize false for maximize.
add the layer to app data layers
return the layer id.
layerName - string, the display layer name
layerData - a geoJson FeatureCollection
isEditable - boolean, true if the layer could be editable, false otherwise.
remove the layer with the layerId
from the app data layers
layerId - string, the layer id to be remove.
show/hide the layer with the layerId
layerId - string, the layer id to be show/hide
show - boolean, true to show the layer, false to hide the layer.
return the overlay data currently display on the map with the mapId.
mapId - string, the id of the map which from to get the overlay data or the active map if id not provide.
return the current mapPosition
return all the overlays currently on the timeline.
draw the annotations on the map.
features - click here for more details on the features object.
put the overlays on the timeline status bar.
overlays - an array of overlays
set the position of the map to point
with radius
point - a geoJson point.
radius - number, the radius in meters.
search - boolean, if true the app search for overlays in the position.
set the map position to the follow rect.
rect - a geoJson polygon
rotate the map by radian
degree - a number between 0-2π
mapId - the id of the map to be rotate or the active map if not provide.
get the map rotation in radian.
set a shadow mouse indicator on the geoPoint
coordinate
geoPoint - a geoJson point
change the search criteria and apply a new search
criteria - a search criteria object.
radiusInMetersBuffer - number, radius to be add to the region
criteria.
Observable that emits when the search criteria was change.
The overlay that display on the map, or undefined if no overlay was display
mapId - the id of the map to be rotate or the active map if not provide.
set the app to minimalist view
collapse - boolean, true to enable minimalist view, false to disable.
clear all the annotations from the map.