FlatmapVuer
A vue component of the flatmap viewer.
Props
Name | Description | Type | Required | Default |
---|---|---|---|---|
entry | The taxon identifier of the species represented by the map. | string | true | - |
uuid | The unique uuid of the flatmap. If given then this exact map will be loaded, overriding taxon and biologicalSex . | string | false | - |
biologicalSex | The biological sex of the species represented by the map. This is specified as metadata in the map's source file. | string | false | '' |
minZoom | The minimum zoom level of the map. | number | false | 1 |
tooltips | The option to add another feature label (FeatureSmallSymbolLayer ) when this tooltips is set to false . | boolean | false | true |
helpMode | The option to show tooltips for help mode. | boolean | false | false |
helpModeActiveItem | The active item index of help mode. | number | false | 0 |
helpModeDialog | The option to use helpModeDialog. On default, false , clicking help will show all tooltips. If true , clicking help will show the help-mode-dialog. | boolean | false | false |
helpModeLastItem | The last item of help mode. | boolean | false | false |
helpModeInitialIndex | The initial index number for help mode tooltips. Set negative (e.g. -2) if there are other tooltips outside of hoverVisibilities . | number | false | 0 |
renderAtMounted | The option to create map on component mounted. | boolean | false | true |
displayMinimap | The option to display minimap at the top-right corner of the map. | boolean | false | false |
displayWarning | The option to show warning. Example for legacy or beta maps. | boolean | false | false |
enableOpenMapUI | Flag to determine rather open map UI should be presented or not. | boolean | false | false |
openMapOptions | The data to show different map options. Available at the bottom-left corner ("Open new map" tooltip). | array | false | [ { display: 'Open AC Map', key: 'AC', }, { display: 'Open FC Map', key: 'FC', }, { display: 'Open 3D Human Map', key: '3D', }, ] |
showStarInLegend | The option to show star in legend area. | boolean | false | false |
isLegacy | Flag to determine whether this is legacy map or not. displayWarning should be shown for legacy map. | boolean | false | false |
displayLatestChanges | The option to show the latest changes. | boolean | false | false |
state | State containing state of the flatmap. | object | false | undefined |
flatmapAPI | Specify the endpoint of the flatmap server. | string | false | 'https://mapcore-demo.org/current/flatmap/v3/' |
sparcAPI | Specify the endpoint of the SPARC API. | string | false | 'https://api.sparc.science/' |
disableUI | Flag to disable UIs on Map | boolean | false | false |
connectivityInfoSidebar | The option to show connectivity information in sidebar | boolean | false | false |
annotationSidebar | The option to show annotation in sidebar | boolean | false | false |
Events
Event Name | Description | Parameters |
---|---|---|
open-map | This event is emitted when the user chooses a different map option from openMapOptions props. | mapOption.key |
annotation-close | - | - |
view-latest-map | The event emitted by viewLatestMap method. | - |
pathway-selection-changed | - | - |
resource-selected | - | - |
pan-zoom-callback | - | - |
connectivity-info-close | This event is emitted when a connectivity info (provenance popup) is closed. | - |
help-mode-last-item | This event is emitted when the tooltips in help mode reach the last item. | - |
shown-tooltip | This event is emitted after a tooltip in Flatmap is shown. | - |
connectivity-info-open | - | - |
annotation-open | - | - |
shown-map-tooltip | This event is emitted after a tooltip on Flatmap's map is shown. | - |
ready | This is onFlatmapReady event. | this (Component Vue Instance) |
Methods
Method | Description | Parameters |
---|---|---|
initialiseDrawing | Function to initialise drawing. | - |
cancelDrawnFeature | Function to cancel a newly drawn feature. | - |
connectedFeatureTooltip | Function to display connected features' tooltip for drawn connectivity. | id |
confirmDrawnFeature | Function to confirm a newly drawn feature. | - |
toolbarEvent | Function to process the annotation toolbar click events. | type name |
annotationDrawModeEvent | Function to fire annotation event based on the provided data . Either edit or delete action. | data |
changeAnnotationDrawMode | Function to update the annotation draw mode. | mode |
clearAnnotationFeature | Function to remove all drawn annotations from flatmap annotation layer. | - |
modifyAnnotationFeature | Function to fire the trash action. See https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#trash-draw for more details. | - |
rollbackAnnotationEvent | Function to rollback the failure drawn from flatmap annotation layer. | - |
commitAnnotationEvent | Function to commit the emitted annotation data from successful new drawn to flatmap annotation layer. | annotation |
fetchAnnotatedItemIds | Function to fetch annotated item id. | userId , participated |
setFeatureAnnotated | Function to add existing drawn annotations to flatmap. | - |
fetchDrawnFeatures | Function to fetch drawn features. | userId , participated |
addAnnotationFeature | Function to draw existing drawn annotations based on selector. | - |
showAnnotator | Function to display annotator toolbar. | flag |
setDrawnType | Function to switch the type of annotation. | flag |
setAnnotatedType | Function to switch the type of person who annotated. | flag |
setFlightPath3D | Function to switch from 2D to 3D | flag |
viewLatestMap | Function to view the latest map (example when you are on legacy map). | - |
backgroundChangeCallback | Function to change the background colour of the map by providing the colour . | colour |
processSystems | Function to process a list of a FC flatmap's systems. | systems |
processTaxon | Function to add taxon identifiers into the taxon connectivity array, by retrieving their corresponding labels using the flatmap API. | flatmapAPI , taxonIdentifiers |
toggleDrawer | Function to show or hide the display of the bottom-left drawer container. | - |
setColour | Function to toggle colour/greyscale of organs. The parameter flag is a boolean, true (colour) and false (greyscale). | flag |
setOutlines | Function to toggle outlines f organs. The parameter flag is a boolean, true to show outlines, false to hide outlines. | flag |
resetView | Function to toggle paths to default. Also called when the associated button is pressed. | - |
zoomIn | Function to zoom in. Also called when the associated button is pressed. | - |
zoomOut | Function to zoom out. Also called when the associated button is pressed. | - |
highlightConnectedPaths | Function to highlight the connected paths by providing path model identifier, pathId . | pathId |
alertMouseEnterEmitted | Function to enable/disable mouse enter and leave event for alert checkbox | payload |
alertSelected | Function to enable/disable (show/hide) pathways with/without alert by providing kay, value payload object {alertKey, true/false} . | payload |
checkAllAlerts | Function to enable/disable (show/hide) all alerts option by providing flag (true/false). | flag |
systemSelected | Function to enable/disable (show/hide) the system by providing kay, value payload object {systemId, true/false} . | payload |
checkAllSystems | Function to enable/disable (show/hide) all systems by providing flag (true/false). | flag |
ftuSelected | Function to display features with annotation matching the provided term. | models |
layersSelected | Function to show or hide the layer by providing {layerId, true/false} in payload . | payload |
checkAllLayers | Function to show or hide all layers by providing payload with payload.keys array and payload.value flag. | payload |
taxonsSelected | Function to show or hide connectivity features studied in particular species by providing {taxonId, true/false} in payload.key, payload.value . | payload |
checkAllTaxons | Function to show or hide connectivity features studied in particular species by providing payload with payload.keys array and payload.value flag. | payload |
pathwaysSelected | Function to hide or show paths of a given type by providing {pathType, true/false} in payload.key, payload.value . | payload |
checkAllPathways | Function to hide or show paths of a given type by providing payload with payload.keys array and payload.value flag. | payload |
enablePanZoomEvents | Function to generate callbacks as a result of panning/zooming the map. flag (boolean) - generate callbacks when true , otherwise disable them. | flag |
annotationEventCallback | Function to process annotation callbacks, invoked when events occur with the map. | payload , data |
eventCallback | A callback function, invoked when events occur with the map. The first parameter gives the type of event, the second provides details about the event. (This is the callback function from MapManager.loadMap() ). | - |
changeViewingMode | Function triggered by viewing mode change. (e.g., from 'Exploration' to 'Annotation') All tooltips and popups currently showing on map will be closed | modeName |
checkAndCreatePopups | Function to create/display tooltips from the provided data . checkNeuronClicked shows a neuron path pop up if a path was recently clicked. | data |
closeTooltip | Function to close tooltip. | - |
createTooltipFromNeuronCuration | Function to create tooltip from Neuron Curation data . | data |
showPopup | Function to show popup on map. | featureId , node , options |
showMarkerPopup | Function to show marker popup. | featureId , node , options |
closeMinimap | Function to close minimap. | - |
setHelpMode | Function to set help mode by providing flag helpMode (true/false). | helpMode |
showTooltip | Function to show tooltip by providing tooltipNumber . | tooltipNumber timeout (default: 500 ) |
hideTooltip | Function to hide tooltip by providing tooltipNumber . | tooltipNumber timeout (default: 500 ) |
displayTooltip | Function to display tooltip by providing featureId (feature ). | feature geometry (default: undefined ) |
openFlatmapHelpPopup | Function to open Flatmap Help Popup. | - |
closeFlatmapHelpPopup | Function to close Flatmap Help Popup. | - |
getLabels | Function to get annotation labels. | - |
getState | Function to get the state (object) of the map. | - |
setState | Function to set state (object) for the map. | state |
restoreMapState | Function to restore map's state from the state provided. | state |
setFlightPathInfo | Function to show flight path option (3D option) based on the map version (currently 1.6 and above). | mapVersion |
createFlatmap | Function to create Flatmap by providing the state . | state |
computePathControlsMaximumHeight | Function to compute path controls maximum height. | - |
mapResize | Function to resize the map. | - |
onFlatmapReady | This function is used for functions that need to run immediately after the flatmap is loaded. | state |
handleMapClick | Function to handle mouse click on map area after the map is loaded. | - |
showMinimap | Function to show or hide the minimap by providing flag (boolean) value. | flag |
showPathwaysDrawer | Function to show or hide the pathways drawer by providing flag (boolean) value. | flag |
searchAndShowResult | Function to display features with annotation matching the provided term, with the option to display the label using displayLabel flag. | term , displayLabel |
searchSuggestions | Function to show search suggestions from the term provided. | term |