• Stars
    star
    440
  • Rank 99,050 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Interactive, extendable street imagery map experiences in the browser, powered by WebGL

GitHub workflow GitHub license npm version

MapillaryJS

MapillaryJS is a client-side JavaScript library for interactive, extendable street imagery map experiences on the web. It takes spatial, semantic, and texture data and renders it using WebGL. MapillaryJS can be customized with camera controls, user interactivity, and data providers and it can be augmented with geospatial rendering, animation, and content placement.

Mapillary

Installation and Usage

To start using MapillaryJS with data from the Mapillary platform, you need an account. When signed in, you need to register an application to get a client access token. When providing your own data, no access 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/[email protected]/dist/mapillary.css"
  rel="stylesheet"
/>

Include the following code in your JavaScript file.

import { Viewer } from "mapillary-js";

const viewer = new Viewer({
  accessToken: "<your access 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/[email protected]/dist/mapillary.css"
  rel="stylesheet"
/>

Include the following code in your TypeScript file.

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

const options: ViewerOptions = {
  accessToken: "<your access 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/[email protected]/dist/mapillary.js"></script>
<link
  href="https://unpkg.com/[email protected]/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({
  accessToken: "<your access 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.

More Repositories

1

OpenSfM

Open source Structure-from-Motion pipeline
Python
3,382
star
2

inplace_abn

In-Place Activated BatchNorm for Memory-Optimized Training of DNNs
Python
1,319
star
3

seamseg

Seamless Scene Segmentation
Python
292
star
4

mapillary_tools

Command line tools for processing and uploading Mapillary imagery
Python
267
star
5

mapillary_sls

Mapillary Street-level Sequences Dataset
Jupyter Notebook
106
star
6

mapillary_vistas

MVD Evaluation Scripts
Python
67
star
7

traffico

Traffic signs packaged in a font
JavaScript
57
star
8

mapillary-python-sdk

A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data.
Python
41
star
9

mapillary_sprite_source

Traffic sign sources and sprites for mapillary.com
JavaScript
27
star
10

metropolis_sdk

A collection of code examples to help users get started with the Mapillary Metropolis dataset
Python
22
star
11

mapillary-sdk-ios

The Mapillary SDK for iOS lets you integrate Mapillary capture functionality into your iOS app.
Objective-C
13
star
12

mapillary-chrome-extension

The awesome mapillary chrome extension
JavaScript
9
star
13

mapillary_photostories

Tell your stories with photos
JavaScript
8
star
14

mapillary-js-examples

Examples on how to use mapillary-js
HTML
7
star
15

traffico-release

Release repository for Traffico
HTML
5
star
16

mapillary-css

Mapillary CSS styles in one place
CSS
3
star
17

mapillary_press

Mapillary Press Kit and Resources
Shell
3
star
18

ansible-riemann-tools

Ansible role for the riemann-tools installation
HTML
1
star
19

mapillary-lintel

Fork of the lintel module that adds functionality specific to Mapillary
C
1
star
20

mapillary_localization

Deprecated library used by legacy web for translations
JavaScript
1
star