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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@webwriter/map

v2.1.1

Published

Geographical map with different terrain options including custom tiling, and GeoJSON support.

Downloads

40

Readme

Map (@webwriter/[email protected])

License: MIT | Version: 2.1.1

Geographical map with different terrain options including custom tiling, and GeoJSON support.

Snippets

Snippets are examples and templates using the package's widgets.

| Name | Import Path | | :--: | :---------: | | Example Location | @webwriter/map/snippets/Example-Location.html |

WwMap (<webwriter-map>)

Geographical map with different terrain options including custom tiling, and GeoJSON support.

Usage

Use with a CDN (e.g. jsdelivr):

<link href="https://cdn.jsdelivr.net/npm/@webwriter/map/widgets/webwriter-map.css" rel="stylesheet">
<script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/map/widgets/webwriter-map.js"></script>
<webwriter-map></webwriter-map>

Or use with a bundler (e.g. Vite):

npm install @webwriter/map
<link href="@webwriter/map/widgets/webwriter-map.css" rel="stylesheet">
<script type="module" src="@webwriter/map/widgets/webwriter-map.js"></script>
<webwriter-map></webwriter-map>

Fields

| Name (Attribute Name) | Type | Description | Default | Reflects | | :-------------------: | :--: | :---------: | :-----: | :------: | | initialPos (initialPos) | { lat: number; lng: number; } | Initial center position of the map.Expected value: object { lat: number, lng: number } (e.g. { lat: 51, lng: 19 }).Optional; when set via attribute, pass a JSON string (e.g. '{"lat":51,"lng":19}'). | { lat: 51, lng: 19, } | ✓ | | mapBounds (mapBounds) | L.LatLngBoundsExpression | Maximum bounding box for panning the map.Expected value: Leaflet LatLngBoundsExpression (e.g. [[northLat, westLng], [southLat, eastLng]]).Optional; when set via attribute, pass a JSON string (e.g. '[[51,6],[50,7]]'). | - | ✓ | | maxZoom (maxZoom) | number | Maximum zoom level allowed when boundsActive is true.Expected value: number (Leaflet zoom level).Optional. | - | ✓ | | minZoom (minZoom) | number | Minimum zoom level allowed.Expected value: number (Leaflet zoom level).Optional. | - | ✓ | | initialZoom (initialZoom) | number | Initial zoom level when the map is created.Expected value: number (Leaflet zoom level).Optional. | 13 | ✓ | | fixedZoom (fixedZoom) | number | Fixed zoom level to enforce when panning is not allowed for viewers (non-edit contexts).Expected value: number (Leaflet zoom level).Optional. | 1 | ✗ | | markers (markers) | array | Static pin markers to display on the map.Expected value: array of { lat: number, lng: number, title?: string }.Optional; when set via attribute, pass a JSON string. | [] | ✓ | | objects (objects) | object | Persisted drawing objects (rectangles, circles, polygons, polylines), keyed by id.Expected value: map id -> { id, type, latlngs, radius?, borderColor, fillColor, borderOpacity, fillOpacity, label? }.Optional; when set via attribute, pass a JSON string. | {} | ✓ | | customTileUrl (customTileUrl) | string | Custom tile URL template to use for the base map layer.Expected value: string URL template containing {z}/{x}/{y}.Optional; when empty, the default base layer is used. | '' | ✓ | | geoJSON (geoJSON) | string | GeoJSON overlay to render on the map.Expected value: stringified GeoJSON (Feature or FeatureCollection).Optional; when empty/falsy, no GeoJSON overlay is shown. | '' | ✓ | | mapWidth (mapWidth) | number | Map container width, as a percentage of the host element's width.Expected value: number (0–100). Applied as CSS width: ${mapWidth}%.Optional. | 100 | ✓ | | mapHeight (mapHeight) | number | Map container height in pixels.Expected value: number (pixels). Applied as CSS height: ${mapHeight}px.Optional. | 500 | ✓ | | boundsActive (boundsActive) | boolean | Whether to enforce mapBounds and maxZoom constraints on the map.Expected value: boolean; when true and mapBounds is set, panning is constrained to those bounds.Optional. | true | ✓ |

Fields including properties and attributes define the current state of the widget and offer customization options.

No public methods, slots, events, custom CSS properties, CSS parts, or editing config.


Generated with @webwriter/[email protected]