mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-25 14:07:28 +00:00
Remove unapplied style setting. Set auto clear only once.
MapillaryJS
MapillaryJS is a JavaScript & WebGL library that renders street level photos from Mapillary.
Using MapillaryJS
To use MapillaryJS you must create an account and then 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.1.0/dist/mapillary.min.js'></script>
<link href='https://unpkg.com/mapillary-js@2.1.0/dist/mapillary.min.css' rel='stylesheet' />
</head>
<body>
<div id='mly' style='width: 640px; height: 480px;' />
<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.
Examples
- MapillaryJS fixed size
- MapillaryJS dynamic size
- MapillaryJS load immediately
- MapillaryJS no cover
- MapillaryJS viewer options
- MapillaryJS subscribe to node changed
- MapillaryJS slider
- MapillaryJS set filter
- MapillaryJS get center and zoom
- MapillaryJS set center and zoom
- MapillaryJS + ESRI JS API
- MapillaryJS + Google Maps
- MapillaryJS + Leaflet
- MapillaryJS + Leaflet ESRI
- MapillaryJS + Leaflet Tangram
- MapillaryJS + Mapbox GL JS
Documentation
Changelog
Every release is described on the GitHub Releases page.
License
MIT License
Contributing to MapillaryJS
See CONTRIBUTING.md.
Migrating from MapillaryJS 1 to 2
See MIGRATING.md.
Languages
TypeScript
98.3%
CSS
1.5%
JavaScript
0.2%

