我试图遵循这个例子:https://rpubs.com/cyclemumner/228100,特别是添加了带有custum投影的wms tile的部分,但是当我运行代码时,我似乎没有得到wms tile 。 我已经从github安装了传单。
if (!require('devtools')) install.packages('devtools')
devtools::install_github('rstudio/leaflet')
使用传单1.0.2.9010,R R-3.3.2和RStudio 1.0.136。
我运行的代码如下
library(leaflet)
zoom <- 1
maxZoom <- 5
crsAntartica <- leafletCRS(
crsClass = 'L.Proj.CRS',
code = 'EPSG:3031',
proj4def = '+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs',
resolutions = c(8192, 4096, 2048, 1024, 512, 256),
origin = c(-4194304, 4194304),
bounds = list( c(-4194304, -4194304), c(4194304, 4194304) )
)
leaflet(options= leafletOptions(crs=crsAntartica, minZoom = zoom, maxZoom=maxZoom, worldCopyJump = FALSE)) %>%
setView(0, -90, 0) %>%
addWMSTiles(baseUrl="https://maps.environments.aq/mapcache/antarc/?",
layers="antarc_ramp_bath_shade_mask",
options=WMSTileOptions(format="image/png",transparent=TRUE),
attribution="xxx") %>%
addGraticule()
我得到的是这个
关于我做错的任何想法?