fkeck / rleafmap Goto Github PK
View Code? Open in Web Editor NEWInteractive maps with R and Leaflet
License: GNU General Public License v3.0
Interactive maps with R and Leaflet
License: GNU General Public License v3.0
Pls take into consideration the need of legend option for map. I believe this will help rleafmap become more attractive for users.
Hi, I have a trouble overlaping a raster image on the leafletmap. The geojson layer is perfect but raster layer is drifting off the boundary . Here is my testing code ::
require(raster)
require(maptools)
cdem<-getData('alt',country='CHN')
cdem<-aggregate(cdem,8)
xian.bd09<-as.numeric(baidumap::getCoordinate('beijing',formatted=T))
require(rleafmap)
cdem.sp<-as(cdem,'SpatialGridDataFrame')
cdem.spl<-spLayer(cdem.sp, layer='CHN_msk_alt',
cells.alpha = seq(0.1, 0.8, length.out = 12))
cn.admin<-getData('GADM',country='CN',level=0)
require(rgeos)
cn.admin <- gSimplify(cn.admin, 0.9, topologyPreserve=T)
cn.admin.spl<-spLayer(cn.admin, fill.col = 1)
bm2<-basemap("stamen.toner")
bm1 <- basemap("mapquest.map")
my.ui <- ui(layers = "topright")
writeMap(bm2,bm1,width = 1000,height =500,cdem.spl,
cn.admin.spl,setView=rev(xian.bd09),interface = my.ui,setZoom=4)
library(rleafmap)
data(campsites)
campsites
Error: object 'campsites' not found
The velov data gets returned instead
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rleafmap_0.2
loaded via a namespace (and not attached):
[1] tools_3.3.1 sp_1.2-3 Rcpp_0.12.6 raster_2.5-8 grid_3.3.1 knitr_1.14 lattice_0.20-33
Hi,
Your layerLegend function could be very helpful since the leaflet package provide no way to custom legend. Any chance we can use this function of your package with a leaflet map ?
Sorry but I don’t really understand javascript and I have not found any clue to make a custom legend with leaflet and R so far.
I would be very greatful if you could help me on this issue (and I think I wouldn’t be the only one!);
Gaël
Hi, your readme has devtools::install_github("fkeck/phylosignal") instead of devtools::install_github("fkeck/rleaflet")
In examples the basemap is not available
"As of July 11, 2016 direct tile access has been discontinued"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.