Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-rd

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-rd

Adds support for the Amersfoort / RD New coordinate system

  • 2.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status npm version

Leaflet.RD

Deze plugin voegt ondersteuning voor het Rijksdriehoeksstelsel toe aan Leaflet. Gebruik het meegelverde coördinatensysteem bij het aanmaken van een nieuwe kaart. Leaflet is dan meteen geschikt voor het tonen van bijvoorbeeld kaartlagen uit PDOK.

This plugin adds support for the Amersfoort / RD New coordinate system. Created for leaflet 1.0 and up. Leaflet 1.1 not supported, use 1.2 in stead.

Usage

Standalone

Include the javascript file on your page behind both Leaflet and Proj4js

Node

Require the 'leaflet-rd' package.

Setup Leaflet

Leaflet.RD adds a projection under L.projection.RD and a CRS under L.CRS.RD.

To immediately start using RD resources on your map set the CRS of your Leaflet map to L.CRS.RD:

var map = L.map("map", {
    crs: L.CRS.RD,
});

The plugin exports L.CRS.RD, in node the following is also possible:

import rd from 'leaflet-rd';

var map = L.map("map", {
    crs: rd,
});

Projecting Markers and Vector Layers

Markers and Vector Layers still expect latlng input. Project points using L.projection.RD.unproject(point) or map.options.crs.projection.unproject. You can convert GeoJson-data using reproject, as an added convenience an proj4 defenition string is located at L.projection.RD.proj4def.

Keywords

FAQs

Package last updated on 09 Oct 2018

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