I'm trying to get the noise pollution layer from the following bts.dot.gov ESRI MapServer to render in R:
https://maps.bts.dot.gov/services/rest/services/Noise/CONUS_road_and_aviation_noise/MapServer
I'm using the following code in RStudio (all necessary packages are installed):
leaflet() %>%
setView(-117.1, 32.9, 10) %>%
addEsriBasemapLayer(esriBasemapLayers$Oceans, autoLabels = TRUE) %>%
addEsriDynamicMapLayer(
url = paste0("https://maps.bts.dot.gov/services/rest/services/Noise/CONUS_road_and_aviation_noise/MapServer"))
However, none of the noise pollution data is being rendered; I only see a blank map.
The following, virtually identical code for an ArcGIS MapServer does work (wildfire data):
leaflet() %>%
setView(-117.1, 32.9, 10) %>%
addEsriBasemapLayer(esriBasemapLayers$Oceans, autoLabels = TRUE) %>%
addEsriDynamicMapLayer(
url = paste0("https://maps7.arcgisonline.com/arcgis/rest/services/USDA_USFS_2014_Wildfire_Hazard_Potential/MapServer"))
Am I missing something here? The two map services seem very similar, but I have little experience. The BTS map does support dynamic layers, while the Wildfire map does not, but I have tried pulling the map using this option (among others) as well:
options = dynamicMapLayerOptions(dynamicLayers = "0")