Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Mapbox-Gl-JS SnippetsNew to Visual Studio Code? Get it now.
Mapbox-Gl-JS Snippets

Mapbox-Gl-JS Snippets

Shirish Patil

|
4,575 installs
| (0) | Free
Snippets for Mapbox Gl JS , mapbox-gl-js
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mapbox GL JS Javascript TypeScript Snippets for VS Code

Now Updated for mapbox-gl.js v0.42.2 release

This extension for Visual Studio Code adds snippets for mapbox-gl.js for TypeScript and JavaScript.

Use Extension

See the CHANGELOG for the latest changes

Usage

Type part of a snippet, press enter, and the snippet unfolds.

TypeScript javascript Mapbox gl js Snippets

Snippet Purpose
mb-new-map Create new map object
mb-basic-map Create basic mapbox object
mb-add-source Add Source to map
mb-on-map-click Add click event to map
mb-script Add script to HTML
mb-geojson-Data Create geojson
mb-add-layer Add layer to map
mb-load-img-from-url Load Image from URL
mb-remove-layer Remove Lauer from Map
mb-remove-source Remove Source from Map
mb-remove-image Remove image from Map
mb-source-loaded Check if Source is loaded
mb-get-source Get Source object
mb-add-event-listners Add event on map

Alternatively, press Ctrl+Space (Windows, Linux) or Cmd+Space (OSX) to activate snippets from within the editor.

Installation

  1. Install Visual Studio Code 1.10.0 or higher
  2. Launch Code
  3. From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
  4. Select Install Extension
  5. Choose the extension
  6. Reload Visual Studio Code
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft