Skip to content

Adds support for the Amersfoort / RD New coordinate system

License

Notifications You must be signed in to change notification settings

geoloep/Leaflet.RD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Adds support for the Amersfoort / RD New coordinate system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published