Strange case of difficult viewing
agronomofiorentini opened this issue · 7 comments
Good evening
First of all, I am a great fan of this package because it speeds up my work like crazy.
I am using the mapedit module for shiny to allow the user to report the contours of farm plots.
The strange thing is that when i use:
- The shiny viewer
- The localhost
- Mobile phone
The map it works perfectly correctly.
While when I use some computers (windows 10 + chrome) I report some display errors.
Can you help me to understand what is the mystery?
@agronomofiorentini glad you are enjoying mapedit
. Since I don't have a replicable example, would you be able to confirm if you have the same result when only using leaflet
not wrapped with mapedit
? This likely means that the map is not showing because of a transition or no size on first render. Let me know and we can try to debug.
Hi @timelyportfolio based on your suggestion i have developed the same application but in this case i used just leaflet without editmod module from the mapedit package
By using the follow code but the problem persist.
Viewer pane rstudio; localhost and mobile phone it is working perfectly while on the chrome browers in windows doesn't work
You can check the problem in this url
https://automaticfarmsolution.shinyapps.io/ReportSatellite_2/
UI - Component
leafletoutput("map")
Server - Component
`output$map<-renderLeaflet({leaflet() %>%
addProviderTiles(providers$OpenStreetMap,
options = tileOptions(minZoom = 2, maxZoom = 15)) %>%
addProviderTiles(providers$Esri.WorldImagery,
options = tileOptions(minZoom = 15, maxZoom = 20),
group = "Esri.WorldImagery") %>%
addControlGPS(options = gpsOptions(position = "topleft",
activate = TRUE,
autoCenter = TRUE,
maxZoom = 5,
setView = TRUE)) %>%
leaflet.extras::addSearchOSM(options = searchOptions(collapsed = TRUE, autoCollapse = TRUE)) %>%
addDrawToolbar(targetGroup='drawPoly',
polylineOptions = F,
circleOptions = F,
markerOptions = F,
circleMarkerOptions = F,
rectangleOptions = F,
singleFeature = FALSE,
editOptions = editToolbarOptions(selectedPathOptions = selectedPathOptions())) %>%
addMeasure(primaryLengthUnit = "meters",
primaryAreaUnit = "hectares",
position = "topleft",
activeColor = "red",
completedColor = "red",
localization = "it")})`
HI @timelyportfolio,
Did you try to solve the problem reported here, because i have still problem to render the mapedit map at the follow link (Microsoft + Chrome Browser)
It is solved.
From my side can be closed
May I ask what the problem was?
I honestly don't know.
I updated both mapview, leaflet, shiny and then strangely enough it fixed the problem.
but the problem originally was that both locally and in the shiny viewer and mobile phone it displayed the map perfectly.
Instead when you proceeded to develop in shinyapps.io and use a microsoft device + chrome browser the map did not render.
Ok, maybe they updated shinyapp.io lately... Who knows. I'll close here