-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #624 from open-formulieren/feature/614-leaflet-tools
[#614] Use `leaflet-tools`
- Loading branch information
Showing
6 changed files
with
120 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
import {RD_CRS} from './rd'; | ||
|
||
const TILES = 'https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/standaard'; | ||
|
||
const ATTRIBUTION = ` | ||
Kaartgegevens © | ||
<a href="https://www.kadaster.nl">Kadaster</a> | | ||
<a href="https://www.verbeterdekaart.nl">Verbeter de kaart</a> | ||
`; | ||
|
||
const TILE_LAYERS = { | ||
url: `${TILES}/EPSG:28992/{z}/{x}/{y}.png`, | ||
options: { | ||
minZoom: 1, | ||
maxZoom: 13, | ||
attribution: ATTRIBUTION, | ||
}, | ||
}; | ||
// sort-imports-ignore | ||
// a hack - this library has side effects because it patches L from leaflet. | ||
import 'proj4leaflet'; | ||
import {CRS_RD, TILE_LAYER_RD} from '@open-formulieren/leaflet-tools'; | ||
|
||
// Roughly the center of the Netherlands | ||
const DEFAULT_LAT_LNG = [52.1326332, 5.291266]; | ||
const DEFAULT_ZOOM = 13; | ||
|
||
const MAP_DEFAULTS = { | ||
continuousWorld: true, | ||
crs: RD_CRS, | ||
attributionControl: true, | ||
center: DEFAULT_LAT_LNG, | ||
zoom: DEFAULT_ZOOM, | ||
}; | ||
|
||
export {TILES, ATTRIBUTION, TILE_LAYERS, DEFAULT_LAT_LNG, DEFAULT_ZOOM, MAP_DEFAULTS}; | ||
export {CRS_RD, DEFAULT_LAT_LNG, DEFAULT_ZOOM, TILE_LAYER_RD}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters