Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@times-visuals/leaflet-map

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@times-visuals/leaflet-map

Template for creating leaflet maps

npmnpm
Version
1.0.1
Version published
Weekly downloads
4
Maintainers
2
Weekly downloads
 
Created
Source

Leaflet map LeafletMap

This is the description for the component

Installation

# Yarn
$ yarn add @times-visuals/leafletMap

# npm
$ npm add @times-visuals/leafletMap

Usage

Optional parameters:

  • position: a [lat, lon] array
  • zoom: an integer
  • tileset: an object containing url, attribution, and maybe ext - plenty can be found on the Leaflet providers list
import LeafletMap from '@times-visuals/leafletMap';

// custom zoom and centering
export default () => <LeafletMap position={[52.518391, 13.403617]} zoom={10} />

// custom tileset
const stamenTonerTileset = {
  url:
    'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.{ext}',
  attribution:
    'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; Map data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
  ext: 'png',
};

export default () => <LeafletMap
      position={[52.518391, 13.403617]}
      zoom={10}
      tileset={stamenTonerTileset}
    />;

FAQs

Package last updated on 05 Jun 2019

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