-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shiny + geemap #1992
Comments
@cidreNMBU Thank you for submitting the feature request. I have not followed the development of rgee for a while and I am surprised and sad to see that rgee is no longer actively maintained. I am not an R user and I don't know if I would be able to develop and maintain a shiny app for geemap. However, I have recently discovered the py-maplibregl package, which supports Rshiny integration. I am working on adding the maplibre support for leafmap. I guess it should work for geemap as well. I will see if I can get a proof of concept soon. Contributions are always welcome. from maplibre import Map, MapContext, output_maplibregl, render_maplibregl
from maplibre.controls import Marker
from shiny import App, reactive, ui
app_ui = ui.page_fluid(
output_maplibregl("maplibre", height=600),
ui.div("Click on map to set a marker"),
)
def server(input, output, session):
@render_maplibregl
def maplibre():
m = Map()
return m
@reactive.Effect
@reactive.event(input.maplibre)
async def coords():
async with MapContext("maplibre") as m:
print(input.maplibre())
lng_lat = tuple(input.maplibre()["coords"].values())
marker = Marker(lng_lat=lng_lat)
m.add_marker(marker)
m.add_call("flyTo", {"center": lng_lat})
app = App(app_ui, server)
if __name__ == "__main__":
app.run() |
Thank you for your quick answer @giswqs. Actually, there's support and fantastic integration of
The issue arises because when deploying the app it looks for the credentials file. In
I suppose something similar can be achieved with
I am not sure if |
Great to hear that shinywidgets support ipyleaflet. Does shiny app supports setting environment? If yes, set the environment |
Here is an example for using geemap with shinywidgets. https://huggingface.co/spaces/giswqs/shiny-geemap Steps
NotesIt apppears that shinywidgets have some issues. It can't render the
|
Hello,
I am an R user who has been using the
rgee
package for a while, but unfortunately, it might not be longer maintained (see this issue. One thing that was great aboutrgee
was the possibility of creating Shiny Applications using R Shiny thanks to the effort of Cesar of creating this template which unfortunately is no longer working.However, Shiny for Python was released less than 2 years ago and I think it would be a good chance to create applications that use
geemap
in the backend. The issue is that it's not very straightforward to develop a Shiny Application that usesgeemap
because it's necesary to use a token or other authentication way.I was wondering if you are interested in creating an automated pipeline like the one that was created for
rgee
(pipeline to deploy).Best regards,
Cidre
The text was updated successfully, but these errors were encountered: