MapillaryJS is a JavaScript & WebGL library that renders street level imagery from Mapillary.
To use MapillaryJS you must create an account and obtain a Client ID by registering an application.
You can use MapillaryJS as a <script>
tag from a CDN, or as a mapillary-js
package on npm.
<!DOCTYPE html>
<html>
<head>
<script src='https://unpkg.com/[email protected]/dist/mapillary.min.js'></script>
<link href='https://unpkg.com/[email protected]/dist/mapillary.min.css' rel='stylesheet' />
</head>
<body>
<div id='mly' style='width: 640px; height: 480px;'></div>
<script>
var mly = new Mapillary.Viewer({
apiClient: '<your client id>',
container: 'mly',
imageKey: '<your image key for initializing the viewer>',
});
</script>
</body>
</html>
Refer to the Examples and Documentation sections below for more information.
- Fixed size
- Dynamic size
- Load immediately
- No cover
- Initialize with or without a key
- Determine if viewer is navigable
- Move to key
- Move in direction
- Viewer options
- Subscribe to node changed
- Edges changed events
- Set filter
- Change filters
- Get center and zoom
- Set center and zoom
- LatLon, computedLatLon and originalLatLon explained
- Get bearing
- Side by side compare
- MapillaryJS + ESRI JS API
- MapillaryJS + Google Maps
- MapillaryJS + HERE Maps
- MapillaryJS + Leaflet
- MapillaryJS + Leaflet ESRI
- MapillaryJS + Leaflet Tangram
- MapillaryJS + Mapbox GL JS
- MapillaryJS + OpenLayers
- Configure marker style and behavior
- Add and drag markers
- Indicate hovered marker
- Sync viewer and map markers
- Add one million interactive markers
- Show point, polygon and rect tags
- Configure point, polygon and rect tags
- Create tags
- Listen to geometry changes
- Indicate hovered tag
Learn how to migrate between major MapillaryJS releases.
Learn how to contribute.
Facebook has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.
MapillaryJS is MIT licensed.