Closed dmaupin12 closed 7 years ago
Did you try passing allowfullscreen=TRUE
in the frameOptions()
function and pass that in the frameWidget()
function?
And if you're using my leaflet.extras for adding the full screen control, try pseudoFullscreen=TRUE
https://bhaskarvk.github.io/leaflet.extras/reference/fullscreen.html
I will try pseudofullscreen and report back. Thanks!
Sent from my iPhone
On Aug 10, 2017, at 4:40 PM, Bhaskar V. Karambelkar notifications@github.com wrote:
And for the fullscreen button function, try pseudoFullscreen=TRUE https://bhaskarvk.github.io/leaflet.extras/reference/fullscreen.html
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I tried the pseudoFullscreen=T option with no luck. Also, adding pseudoFullscreen=T makes the full screen button stop working for desktop as well.
Do you have a reproducible sample code I can look at ?
see code below.
library(leaflet)
library(leaflet.extras)
library(widgetframe)
library(tidyverse)
longitude<-c(-103.551700, -103.534886)
latitude<- c(31.318153, 31.149694)
ex<- data.frame(longitude,latitude)
map1<-leaflet() %>%
addProviderTiles(providers$Esri.WorldTopoMap, group = "Esri.WorldTopoMap" )%>%
addCircleMarkers(data=ex,~longitude,~latitude)
map1<-map1 %>% setView(map1,lng=-103.5517, lat=31.318, zoom=10)
map1<-map1%>% addScaleBar(position="topleft")
frameWidget(map1 %>% addFullscreenControl(),
height= 450, width= '95%',options=frameOptions(allowfullscreen = T))
frameWidget(map1 %>% addFullscreenControl(pseudoFullscreen=T),
height= 450, width= '95%',options=frameOptions(allowfullscreen = T))
I changed your code slightly, could you verify again if both the framed widgets don't work in iPhone.
No luck, I'm using Tranquil theme in blogdown. Could that be the issue? To clarify, the leaflet map appears, however the fullscreen button does not work like it does without the widget.
Nah I don't think the theme matters coz the widgets are loaded inside an iframe and thus unaffected by the theme. It could be the specific case of iPhone browser in which case it might be hard to fix. I'll give you some pure HTML samples to tryout next week, just to rule out R/widgetframe part. But I am almost certain this is a browser specific issue.
I think i found a solution! All i needed to do was add in width=100%. I haven't tired it with widgetframe, but it works correctly without it. I can't believe i didn't try this sooner.
map1<-leaflet(width='100%')
Closing as this is an edge case bug probably in the iPhone browser which might not be fixable on widgetframe side.
Great package first of all! Everything seems to be working correctly in leaflet when I use widget frame except the full screen button on iPhone. It works correctly on desktop though. Also full screen works correctly without using the widget frame on phone.