Skip to content

Instantly share code, notes, and snippets.

@dlebauer
Last active April 2, 2020 01:02
Show Gist options
  • Save dlebauer/e377cd3f53b2fa84809be30247737ba4 to your computer and use it in GitHub Desktop.
Save dlebauer/e377cd3f53b2fa84809be30247737ba4 to your computer and use it in GitHub Desktop.
Maps of the Maricopa Ag center using Leaflet
library(leaflet)
library(leafem)
library(wellknown)
leaflet(options = leafletOptions(minZoom = 5, maxZoom = 5)) %>%
addTiles() %>%
# addProviderTiles(provider = providers$Esri.WorldStreetMap) %>%
addPopups(lng = -111.975, lat = 33.0755,
popup = "<center>Maricopa Agricultural Center<br/>Maricopa, AZ</center>",
options = popupOptions(closeButton = FALSE, ))
leaflet(options = leafletOptions(minZoom = 1, maxZoom = 18)) %>%
addProviderTiles(provider = providers$Esri.WorldImagery) %>%
leafem::addFeatures(data = st_as_sfc(
"POLYGON ((-111.9747967 33.0764953 711.68, -111.9747967 33.0745228 711.68, -111.9750963 33.0745228 711.68, -111.9750963 33.0764953 711.68, -111.9747967 33.0764953 711.68))"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment