Skip to content

Commit 15aecde

Browse files
committed
For now just the dependency to add the reqd JS
1 parent 4370ace commit 15aecde

File tree

4 files changed

+6096
-0
lines changed

4 files changed

+6096
-0
lines changed

R/plugin-Proj4Leaflet.R

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
leafletProj4LeafletDependencies <- function() {
2+
list(
3+
htmltools::htmlDependency(
4+
"proj4leaflet",
5+
"0.7.2",
6+
system.file("htmlwidgets/plugins/Proj4Leaflet", package = "leaflet"),
7+
script = c('proj4-compressed.js', 'proj4leaflet.js')
8+
)
9+
)
10+
}
11+
12+
#' Adds support for Proj4Leaflet
13+
#' @param map The Leaflet map.
14+
#' @export
15+
addProj4Leaflet <- function(map) {
16+
map$dependencies <- c(map$dependencies, leafletProj4LeafletDependencies())
17+
map
18+
}
19+

inst/htmlwidgets/plugins/Proj4Leaflet/proj4-compressed.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)