npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

boomack-plugin-leaflet

v0.2.1

Published

Boomack PlugIn for rendering maps with Leaflet

Downloads

2

Readme

Boomack Plug-In Leaflet

Features

Plug-In ID: leaflet

Text Transformation leaflet

Render a geographic map with markers, using the JavaScript library Leaflet. The default map source is OpenStreetMap.

Input

The input is expected to be a valid JSON or YAML map. The input map is merged with the map from the display options and interpreted in the way described below.

The properties from the input take precedence over the properties from the display options.

Display Options

  • leaflet
    A map, which is merged with the input and interpreted in the way described below.

Specification

The merged map from the input and the display options supports the following properties:

  • width
    The width of the viewport in CSS compatible units. Defaults to "100%".
  • height
    The height of the viewport in CSS compatible units. Defaults to "100%".
  • attribution
    An HTML fragment to be displayed at the bottom of the map. Defaults to &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.
  • tileServerUrl
    A template for the URL for loading map tiles. Defaults to https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png.
  • tileSize
    Default to null.
  • accessToken
    An access token to transmit when requesting tiles. Intended for commercial tile servers. Defaults to null.
  • minZoom
    The minimal allowed zoom level: 1 – 20. Defaults to null.
  • maxZoom
    The maximal allowed zoom level: 1 – 20. Defaults to null.
  • maxBounds
    A region to limit the view to. Described by a pair of two geo coordinates as diagonal corners of a rectangular region.
  • bounds
    The initial region to display in the view. Described by a pair of two geo coordinates as diagonal corners of a rectangular region.
  • zoom
    The initial zoom level: 1 – 20. Defaults to null.
  • center
    The center of the initially visible region in the viewport. Defaults to lat and lon, or null.
  • lat
    The latitude of a single point marker without any additional properties, and potentially the center of the initially visible region. Defaults to null.
  • lon / lng
    The longitude of a single point marker without any additional properties, and potentially the center of the initially visible region. Defaults to null.
  • marker
    One or multiple point markers. Defaults to [].
  • lines
    One or multiple line markers. Defaults to [].
  • areas
    One or multiple area markers. Defaults to [].

You can use either bounds, or center in combination with zoom.

Geo Position

A geo position is encoded with one of the following structures:

  • [ <lat>, <lon> ]
  • { lat: <lat>, lon: <lon> }
  • { lat: <lat>, lng: <lon> }

Point Marker

A point marker is a geo position, optionally with the following additional properties:

  • type
    One of "icon" or null for a marker icon, "circle", or "rectangle". The short version "rect" is accepted also. Defaults to null.
  • width
    The width of a rectangular marker in kilometers.
  • height
    The height of a rectangular marker in kilometers.
  • title
    A simple tool tip text to display, when hovering over the marker with the mouse cursor.
  • popup
    A HTML fragment for the content area of a pop-up. Which is displayed after clicking on the marker.

If type is set to "circle" all options of a Leaflet Circle are supported. If type is set to "rectangle" all properties of a Leaflet Polyline are supported.

Line Marker

A line marker is either an array of geo positions, or a map with the following properties:

  • vertices
    An array with geo positions.
  • popup
    A HTML fragment for the content area of a pop-up. Which is displayed after clicking on the marker.

Additionally all properties of a Leaflet Polyline are supported.

Area Marker

An area marker is either an array of geo positions, or a map with the following properties:

  • vertices
    An array with geo positions.
  • popup
    A HTML fragment for the content area of a pop-up. Which is displayed after clicking on the marker.

Additionally all properties of a Leaflet Polygon are supported.

Media Types

The plug-in provides the following media types:

  • application/x-leaflet