[![GitHub workflow](https://github.com/mapillary/mapillary-js/workflows/Build/badge.svg)](https://github.com/mapillary/mapillary-js/actions?query=branch%3Amain) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mapillary/mapillary-js/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/mapillary-js.svg?style=flat)](https://www.npmjs.com/package/mapillary-js) # MapillaryJS MapillaryJS is an interactive street imagery and semantic mapping visualization platform on the web. It takes spatial, semantic, and texture data and renders it using JavaScript and WebGL. MapillaryJS can be augmented and extended with custom rendering, animation, camera controls, interactivity, and data providers. Mapillary ## Installation and Usage To start using MapillaryJS with data from the [Mapillary](https://www.mapillary.com) platform, you need an [access token](https://www.mapillary.com/dashboard/developers). When [providing your own data](https://mapillary.github.io/mapillary-js/docs/extension/extend), no access token is needed.
ES6 bundler Install the package via [Yarn](https://classic.yarnpkg.com) (or [npm](https://docs.npmjs.com/about-npm)). ```sh yarn add mapillary-js@next ``` Use a CSS loader or include the CSS file in the `` of your HTML file. ```html ``` Include the following code in your JavaScript file. ```js import { Viewer } from "mapillary-js"; const viewer = new Viewer({ accessToken: "", container: "", imageId: "", }); ```
TypeScript Install the package via [Yarn](https://classic.yarnpkg.com) (or [npm](https://docs.npmjs.com/about-npm)). ```sh yarn add mapillary-js@next ``` Use a CSS loader or include the CSS file in the `` of your HTML file. ```html ``` Include the following code in your TypeScript file. ```ts import { Viewer, ViewerOptions } from "mapillary-js"; const options: ViewerOptions = { accessToken: "", container: "", imageId: "", }; const viewer = new Viewer(options); ```
CDN Include the JavaScript and CSS files in the `` of your HTML file. ```html ``` Add a container to the `` of your HTML file. ```html
``` The global [UMD](https://github.com/umdjs/umd) name for MapillaryJS is `mapillary`. Include the following script in the `` of your HTML file. ```js ```
## Documentation - [Getting Started with MapillaryJS](https://mapillary.github.io/mapillary-js/docs) - [Developing Extensions](https://mapillary.github.io/mapillary-js/docs/extension/extend) - [Examples](https://mapillary.github.io/mapillary-js/examples) - [API Reference](https://mapillary.github.io/mapillary-js/api) - [Migration Guide](https://mapillary.github.io/mapillary-js/docs/migration/v4) - [Contribution Guidelines](./.github/CONTRIBUTING.md) ## Code of Conduct Facebook has adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its [Code of Conduct](https://code.facebook.com/codeofconduct), and we expect project participants to adhere to it. Please read [the full text](./.github/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated. ## License MapillaryJS is [MIT licensed](./LICENSE).