Navigable Minimap¶
- Plugin name:
"navigable_minimap"
- Plugin namespace:
"navigable_minimap"
Loading the plugin¶
If this plugin is loaded, the module will have the following additional features:
Methods¶
createNavigableMinimap()¶
Creates a secondary instance of a viewer with a subset of methods that will be linked to the original module and will show a navigable minimap. This instance has special features that can be checked here.
Input
This method has as input the same object as when the module is loaded.
Output
Returns a promise that resolves in a minimap instance.
Example
getNavigableMinimap()¶
Returns the minimap instance if it has been created, or null
if not.
Navigable Minimap instance API¶
Minimap instance has some particularities:
- Camera is fixed showing the full map.
The following methods have been removed:
- loadMap
- bindInterfaceAction
- goTo
- focusOn
- move
- scaleBy
The following properties have been removed:
- zoom_buttons_speed
- navigation_buttons_speed
- max_scaling_factor
- min_scaling_factor
The following flags have been removed:
- panning
- zooming
- automatic_hover
- automatic_selection
- variable_zoom_on_resize
Methods¶
loadMinimap¶
If the linked viewer instance has loaded a map, the minimap instance will try to load the minimap. Returns a promises that is resolved when the minimap finishes loading.
Warning
Not all maps have a minimap assigned. If a map has no minimap, then the instance won't load anything.
Example:
flags¶
minimap_interactive¶
If true
, it is possible to drag the minimap area to move the camera of the main instance.
Example:
minimap_automatic_load¶
If true
, the instance will manage when the minimap should load and when not. If false
loadMinimap
has to be called.
If automatic_load
is enabled, you don't need to call loadMinimap but then you cannot
use its promise to know when the minimap has finished loading. To cover this, you can use
the end_load
callback in the minimap instance.