New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mapbox-gl-utils-source

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox-gl-utils-source

Mapbox-GL utils, commonly used map service data sources.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Mapbox-GL utils - Source

This is a utils of Mapbox-GL.

The tool provides a data Source for daily use.

Demo

English | 简体中文

Content

Including the following map services:

  • TianDiTu

    • TianDiTu.satellite.map
    • TianDiTu.satellite.annotation
    • TianDiTu.streets.map
    • TianDiTu.streets.annotation
  • Google

    • Google.satellite.Map
    • Google.streets.mapWithAnnotation
  • OpenStreetMap

    • OSM.streets.mapWithAnnotation

Bundle

The following bundles are provided:

types/
build/
├── bundle.js
├── bundle.min.js
├── bundle.esm.js
├── bundle.esm.min.js
├── bundle.cjs.js
├── bundle.cjs.min.js
├── bundle.umd.js
└── bundle.umd.min.js

It also provides the corresponding sourcemap file.

Usage

Browser

In the browser, referenced by the <script> tag:

<script src="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.js"></script>
<!-- Reference the utils library -->
<script src="../build/bundle.min.js"></script>

It is mounted at mapboxgl._utils.Source, so you can use it like this:

const { TianDiTu, Google } = mapboxgl._utils.Source

If you can't get the bundle file, you can try to build it yourself.

Node.js

Install via npm:

npm install mapbox-gl-utils-source

Use it like this:

// ES Module
import { TianDiTu, Google } from 'mapbox-gl-utils-source'

// CommonJS
const utilsSource = require('mapbox-gl-utils-source')

Build

If you cannot get the bundle file, or you want to add additional map service resources and other reasons, you can build your own.

First, clone to local

git clone https://github.com/wang1212/mapbox-gl-utils-source.git <dir>
cd <dir>/
npm install

Then you can modify the files in src/ by yourself, and run the following command when finished:

npm run build

The bundle file will be generated in the build/ folder, include sourcemap file.

License

MIT.

Keywords

FAQs

Package last updated on 29 May 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc