Thanks @barret for your response!
mesures<- readOGR("data_simplify", "Mesures_compensation")
mesuresGE<-spTransform(mesures, CRS("+init=epsg:4326"))
labelsMesuresGE <- sprintf("%s
%s ",
mesuresGE@data$commune,
mesuresGE@data$Type_Regroup)%>%
lapply(htmltools::HTML)
leaflet()%>%
addTiles() %>%
addProviderTiles(providers$Esri.WorldImagery)%>%
setView(6.12, 46.185, zoom=12) %>%
addPolygons(data= mesuresGE, color = ~palMesuresGE(mesuresGE@data$Type_Regroup),
stroke = FALSE, smoothFactor = 0.2, fillOpacity = 1, group= "Genève",
highlight =
highlightOptions(weight = 10,color = "white", dashArray = "",
fillOpacity = 0.7,bringToFront = TRUE),
label = labelsMesuresGE,labelOptions = labelOptions(
style = list("font-weight" = "normal", padding = "3px 8px"),
textsize = "15px", direction = "auto"))
-
Yes, all the polygons shifted by the same amount and I've the same problem for all my layers (I've 10 others maps).
-
I tried the map view::addMouseCoordinates() but the polygons locations do not match with the coordinates.
Thanks in advance for your help!
Sophie