How to programmatically add a rectangle to the map? #1774
Answered
by
giswqs
Gui-FernandesBR
asked this question in
Q&A
-
Ok, I know this should be easy, but I surprisingly had a hard time to find such feature. The thing is that I can draw a polygon in the map and than use the More specifically, I'd love to do something like: import ee
import geemap.geemap as geemap
sao_paulo_box = ee.Geometry.BBox(
west=-46.81, south=-23.4, east=-46.26, north=-23.8,
)
lat, lon = -23.5546721, -46.7318389
my_map = geemap.Map(center=[lat, lon], zoom=10)
my_map.add(sao_paulo_box)
my_map However, the polygon (BBox) never shows in my window when I run the code. Am I doing something wrong here? |
Beta Was this translation helpful? Give feedback.
Answered by
giswqs
Oct 16, 2023
Replies: 1 comment 1 reply
-
For ee objects, you should use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
giswqs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For ee objects, you should use
my_map.add_layer(sao_paulo_box)
.