MapillaryJS is a JavaScript & WebGL library that renders street level photos from Mapillary.
To use MapillaryJS you must create an account and obtain a Client ID. Then you can use MapillaryJS with a <script>
tag.
<!DOCTYPE html>
<html>
<head>
<script src='https://unpkg.com/mapillary-js@2.2.0/dist/mapillary.min.js'></script>
<link href='https://unpkg.com/mapillary-js@2.2.0/dist/mapillary.min.css' rel='stylesheet' />
</head>
<body>
<div id='mly' style='width: 640px; height: 480px;'></div>
<script>
var mly = new Mapillary.Viewer(
'mly',
'<your client id>',
'<your photo id for initializing the viewer>'
);
</script>
</body>
</html>
Alternatively, you can npm install mapillary-js
to use it with module loader or bundler of your choice.
Refer to the Examples and Documentation sections below for more information.
- Fixed size
- Dynamic size
- Load immediately
- No cover
- Move to key
- Move in direction
- Move close to latitude and longitude
- Viewer options
- Subscribe to node changed
- Set filter
- Get center and zoom
- Set center and zoom
- Slider
- Storytelling with route component
- MapillaryJS + ESRI JS API
- MapillaryJS + Google Maps
- MapillaryJS + Leaflet
- MapillaryJS + Leaflet ESRI
- MapillaryJS + Leaflet Tangram
- MapillaryJS + Mapbox GL JS
Every release is described on the GitHub Releases page.
MIT License
See CONTRIBUTING.md.
See MIGRATING.md.