This is the sixth blog entry in my series Leaflet-Diary. In my last post: Chapter 4, Towards Leaflet 1.1, I talked about changes that were made to the Leaflet package to make it extensible. This one is about the release of version 1.1 and what’s coming in the months ahead.
- Leaflet 1.1.0 has finally been released and available via CRAN. It contains a ton of new features, enhancements, and bug fixes.
- Next iteration of changes will start soon.
- Leaflet.extras is coming along nicely and should also be available on CRAN in the near future.
After almost a full year of development and with contributions from many people, Leaflet 1.1.0 was released on CRAN. Although RStudio folks were really nice to mention my humble contribution, I can personally tell you that this was a combination of contributions from a lot of folks. A truly team effort of many people involved in improving the GIS visualization capabilities in R. Here I will elaborate on the RStudio blog post highlighting some of the major features available in leaflet 1.1.0. If you have followed the past posts of Leaflet Diary you might be familiar with most of the following items.
- Support for custom projections via the
leafletCRSclass. To see this in action check out some of the examples I have uploaded to Rpubs.
- Support for labels on mouse over.
- Mutually compatible marker clustering and grouping. See fourth example in this Rpubs page.
- Auto-completable 3rd party tiles provider list.
- Ability to highlight shapes on mouse over.
- Support for more customized markers.
- Support for sf objects in addition to
sfis the successor and in many ways a better alternative to
spfor storing/processing spatial data in R.
- Support for crosstalk from cross-widget communication. This allows your leaflet widget to interact with other widgets on the page.
- With version 1.1.0 leaflet will handle missing data more gracefully. It will either warn or error out when data is missing depending on whether it can or cannot proceed.
As you can see a lot of effort and time was put in to making Leaflet 1.1.0 as bug free and as feature rich as possible by everyone involved.
leaflet.extras is an add-on R package that provides enhanced functionality using a lot of 3rd plugins. For those unfamiliar with
leaflet.extras here is a small list of feature set it supports.
- Enhanced and extended support for GeoJSON, TopoJSON, GPX, KML file formats.
- Automatic choropleths with bi-directional legend highlighting.
- More customized icons.
- Support for drawing shaped and markers on the map and interacting with them in Shiny.
- Search GeoJSON and markers on the map. Geolocate using OSM Nominatim API.
- Support for time dimension. (Coming soon).
- Miscellaneous features like tile caching, suspend map during scrolling, GPS locator.
If you work with ESRI products like ArcGIS/ArcMap etc. Also check out my other add-on package leaflet.esri. More on this in a separate blog post.
2017 promises to bring a lot of exciting features to geospatial data analysis and visualization using R. A lot of interested parties and experts in this domain are involved in the process. If you want to follow I suggest you check out r-spatial and its related products/blogs. Also the folks over at ROpenSci are doing some fantastic work in providing a lot of packages for geospatial analysis.