Skip to content

Instantly share code, notes, and snippets.

@tim-salabim
Created September 21, 2016 17:08
Show Gist options
  • Save tim-salabim/9d132266609f49ae13688595eab04d21 to your computer and use it in GitHub Desktop.
Save tim-salabim/9d132266609f49ae13688595eab04d21 to your computer and use it in GitHub Desktop.
compare maps
library(leaflet)
library(mapview)
spatial_merge <- gadmCHE
m1 <- leaflet() %>%
addTiles() %>%
addPolygons(data = spatial_merge,
layerId = spatial_merge@data$OBJECTID,
stroke= TRUE, fillOpacity = 0.5, smoothFactor = 0.5, weight=1,
color = "grey", opacity = 1,
popup=paste(sep= "<br/>",
"<b>FeatureID: </b>", row.names(spatial_merge)))
m2 <- mapview(gadmCHE)
sync(m1, m2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment