Comments (6)
Looking at the Stamen reference, it looks pretty straightforward. Try this:
leaflet() %>% addTiles('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png',
attribution = paste(
'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, ',
'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ',
'Data by <a href="http://openstreetmap.org/">OpenStreetMap</a>, ',
'under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.'
)
)
from leaflet.
@bungalow-bill Thanks for this
Is there also a way to use googleMaps
I imagine often the raw lat/lons will have been obtained via the google API using ggmap or RgoogleMaps and then, I believe, you are legally supposed to use their map as the tiles
from leaflet.
@pssguy, there is a way to use googleMaps, but it requires a plugin - something I don't know how to use with htmlwidgets yet
If you just want satellite imagery or other tile sources, you should look at the examples here. Using the example I gave above, it is fairly straightforward to see how these other services can be used.
from leaflet.
@sebastianbarfort another option is to use a different geolocation service, e.g. https://github.com/trestletech/rydn
from leaflet.
thanks @hadley, I'll look into it.
@bungalow-bill your solution worked fine for what I wanted to do. Thanks for providing this.
from leaflet.
Did the plugin for Google Maps get incorporated?
from leaflet.
Related Issues (20)
- leaflet is dependent on R3.6.0 via leaflet.providers, not R3.1.0 as per DESCRIPTION HOT 4
- DESCRIPTION should require minimum version for `raster` to avoid test failures HOT 8
- Problem when measuring distances in square kilometers
- Stamen Tile Deprecation Warning HOT 3
- Release leaflet 2.2.1
- Layer control fails when using clusterOptions
- Leaflet Map not loading after window size changes
- htmlwidgets 1.6.3 breaks addEasyButton HOT 1
- Update of map not works HOT 1
- addPolyline() with SpatVector fails if terra is not loaded because check_crs_terra() is missing depency terra::crs HOT 2
- toggle baseGroups legends in the same way as overlayGroups in addLayersControl HOT 1
- Proj4Leaflet-TMS.R example is broken; broken TMS in Leaflet is possibly the culprit! HOT 2
- tms = TRUE not working with known TMS provider (from NASA!) HOT 2
- Leaflet muddling RGB rasters from terra
- No documentation on the Polyline 'offset' functionality
- Error in addLegend: unused arguments HOT 2
- addTiles does not allow display of self-hosted vector tiles
- Specifying labels as zero-length character vector causes error
- Update docs to use `{sf}` or `{terra}` HOT 1
- Remove vignettes/articles/nc after successful site build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.