-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#614] Use leaflet-tools
#624
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ccc4a51
[#614] Use `leaflet-tools`
Viicos fd0fbb4
[#614] Fix import
Viicos 14323af
[#614] Build fix
Viicos 46003b8
[#614] Update sort plugin to take ignore comment into account
Viicos 340a95f
[#614] Remove unneeded file
Viicos 3a833e9
[#614] Update to latest leaflet-tools
Viicos ce6306e
[#614] Fix bug and cleanup
Viicos 5de6fee
:coffin: [#614] continuousWorld hasn't been an option since leaflet 1.0
sergei-maertens cf2fe87
:art: [#614] Remove unused import/export
sergei-maertens File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping we could get rid of this file entirely and instead use only the exports from
@open-formulieren/leaflet-tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could but there are still some constants specific to the sdk:
DEFAULT_LAT_LNG
,DEFAULT_ZOOM