2021-05-20 21:24:27 +02:00
2021-05-18 07:25:20 +02:00
2021-05-18 17:14:27 +02:00
2021-03-27 18:34:32 +01:00
2021-05-18 07:25:20 +02:00
2021-03-15 11:23:22 +01:00
2021-05-12 17:38:12 +02:00
2016-01-18 11:33:06 +01:00
2021-01-20 09:12:42 +01:00
2020-11-13 19:35:35 +01:00
2021-05-19 13:11:13 +02:00
2021-05-18 17:14:27 +02:00
2021-03-27 18:34:32 +01:00

GitHub workflow GitHub license npm version

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. It 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 platform, you need an app token. When providing your own data, no app token is needed.

ES6 bundler

Install the package via Yarn (or npm).

yarn add mapillary-js

Use a CSS loader or include the CSS file in the <head> of your HTML file.

<link
  href="https://unpkg.com/mapillary-js@4.0.0-beta.5/dist/mapillary.css"
  rel="stylesheet"
/>

Include the following code in your JavaScript file.

import { Viewer } from "mapillary-js";

const viewer = new Viewer({
  apiClient: "<your app token>",
  container: "<your HTML element ID>",
  imageId: "<your image ID for initializing the viewer>",
});
TypeScript

Install the package via Yarn (or npm).

yarn add mapillary-js

Use a CSS loader or include the CSS file in the <head> of your HTML file.

<link
  href="https://unpkg.com/mapillary-js@4.0.0-beta.5/dist/mapillary.css"
  rel="stylesheet"
/>

Include the following code in your TypeScript file.

import { Viewer, ViewerOptions } from "mapillary-js";

const options: ViewerOptions = {
  apiClient: "<your app token>",
  container: "<your HTML element ID>",
  imageId: "<your image ID for initializing the viewer>",
};
const viewer = new Viewer(options);
CDN

Include the JavaScript and CSS files in the <head> of your HTML file.

<script src="https://unpkg.com/mapillary-js@4.0.0-beta.5/dist/mapillary.js"></script>
<link
  href="https://unpkg.com/mapillary-js@4.0.0-beta.5/dist/mapillary.css"
  rel="stylesheet"
/>

Add a container to the <body> of your HTML file.

<div id="mly" style="width: 400px; height: 300px;"></div>

The global UMD name for MapillaryJS is mapillary. Include the following script in the <body> of your HTML file.

<script>
var { Viewer } = mapillary;

var viewer = new Viewer({
  apiClient: "<your app token>",
  container: "mly",
  imageId: "<your image ID for initializing the viewer>",
});
</script>

Documentation

Code of Conduct

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.

License

MapillaryJS is MIT licensed.

Description
Interactive, extendable street imagery map experiences in the browser, powered by WebGL
Readme MIT 73 MiB
Languages
TypeScript 98.3%
CSS 1.5%
JavaScript 0.2%