I am using geemap a geospatial library that uses google earth engine python API for geospatial data analysis. GeeMap works well in Google Colab or Jupyter notebooks.
When I create a Map instance using the geemap in google colab
import geemap Map = geemap.Map(lat=33,lon=72) Map
Google colab shows the ipyleaflet basemap with all the drawing controls, zoom controls etc Drawing controls are a set of tools that helps to draw a circle, square, line etc on the Map
However the same library when installed in the flask environment works well map loads fine but there are no drawing tools or zoom controls. Even when I explicitly define
Map = geemap.Map(lat=33,lon=72,draw_ctrl=True) still nothing shows up.
When the app loads the console shows three errors like 404 ipyleaflet.js, ipyevents.js, ipywidgets undefined.
Basically the Map that shows on google colab with all the controls etc I am rendering that inside a html div. Is there any way to circumvent it. I am new to flask and don’t understand things. But I suspect this has to do something with these three files. Also in google colab when I draw something on map I can store the coordinates of geometry draw in a variable and the response is a json which can be used to do further geo-spatial analysis.
I tried adding the CDN links of ipyleaflet and ipywidgets in the html page head section and drawing tools appear. But they’re not communicating with python. If I set draw_ctrl to False it still appears. And the variable when printed returns null which should be a json