Socket
Socket
Sign inDemoInstall

mapillary-js

Package Overview
Dependencies
42
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mapillary-js

A WebGL interactive street imagery library


Version published
Weekly downloads
6.7K
decreased by-1.97%
Maintainers
1
Install size
60.3 MB
Created
Weekly downloads
 

Changelog

Source

4.1.2 - November 15, 2023

:bug: Fixed

  • Request user (creator) from Graph API (5c86f4f)

Readme

Source

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/mapillary-js@4.1.2/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/mapillary-js@4.1.2/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/mapillary-js@4.1.2/dist/mapillary.js"></script>
<link
  href="https://unpkg.com/mapillary-js@4.1.2/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.

Keywords

FAQs

Last updated on 15 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc