Git Product home page Git Product logo

mglstreetviewcontrol's Introduction

Mapbox GL JS Street View Control

Demo

This plugin will add a button to open either Google Street View or Mapillary at the desired location. When the button is clicked a map marker is added to the map. Once the user moves the added map pin to the desired location, the plugin will check for a valid mapillary image, and if so, show a prompt to either open Mapillary or Google Street View. If no Mapillary image is found, it simply opens Google Street View.

  map.addControl(new mglStreetViewControl({
    mapillaryAlias: "COZ" //optional
    mapillaryLayerOptions: {
      userKey: "<MapillaryUserKey>", //optional - default to City of Zanesville imagery, can be cleared by setting to false or only setting the pano setting
      pano: 1 //1 or 0 //defaults to 1
    }
  }), 'top-right');

Available options include setting the pano or 360 deg panoramic setting to true or false (1 or 0), and filtering the Mapillary images by a Mapillary userKey. By default the panoramic setting is on and the userKey is set to the City of Zanesville. If the pano is set and the userKey is omitted or marked false, the all Mapillary images are shown that match the pano setting.

The plugin should be added after the map.load event, as it adds mapillary layers to the map.

Check the license for Google and Mapillary to see if this plugin is suitable for your application.


A project by getBounds.

© 2020 Malcolm Meyer (MIT)

mglstreetviewcontrol's People

Contributors

reyemtm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xcugasbackend1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.