Create a new viewer instance.
required id of an DOM element which will
be transformed into the viewer.
required Mapillary API ClientID, can
be obtained from https://www.mapillary.com/app/settings/developers.
optional photoId to start from, can be any
Mapillary photo, if null no image is loaded.
optional configuration object specifing Viewer's initial setup.
Subscribe to an event by its name
Fired when the viewer is loading more data.
Fired when the viewer starts transitioning from one view to another, either by changing the node or by interaction such as pan and zoom.
Fired every time the viewer navigates to a new node.
Private ComponentController object which manages component states.
Private Container object which maintains the DOM Element, renderers and relevant services.
Private EventLauncher object which fires events on behalf of the viewer.
Private Navigator object which controls navigation throught the vast seas of Mapillary.
Fired when the viewer finishes transitioning and is in a fixed position with a fixed point of view.
Activate a component.
Name of the component which will become active.
Activate the cover (deactivates all other components).
Set an OAuth 2.0 bearer token for API requests of protected resources.
OAuth 2.0 bearer token.
Deprecated.
Deactivate a component.
Name of component which become inactive.
Deactivate the cover (activates all components marked as active).
Get the basic coordinates of the current photo that is at the center of the viewport.
Promise to the basic coordinates of the current photo at the center for the viewport.
Get a component.
Name of component.
The requested component.
Get the photo's current zoom level.
Promise to the viewers's current zoom level.
Move close to given latitude and longitude.
Latitude, in degrees.
Longitude, in degrees.
Promise to the node that was navigated to.
Navigate in a given direction.
Direction in which which to move.
Promise to the node that was navigated to.
Navigate to a given photo key.
A valid Mapillary photo key.
Promise to the node that was navigated to.
Detect the viewer's new width and height and resize it.
Set the basic coordinates of the current photo to be in the center of the viewport.
Set the viewer's render mode.
Render mode.
Set the photo's current zoom level.
Generated using TypeDoc
Viewer
The Viewer object represents the navigable photo viewer. Create a Viewer by specifying a container, client ID, photo key and other options. The viewer exposes methods and events for programmatic interaction.