Jonathan Marokhovsky commited on
Commit
3c0eaed
1 Parent(s): a6aabb2

Adding Euromap info from the available pmtiles

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -22,6 +22,10 @@ I'm looking to implement at least these things:
22
  hi = "https://data.source.coop/vizzuality/hfp-100/hfp_2021_100m_v1-2_cog.tif"
23
  deforest = "https://data.source.coop/vizzuality/lg-land-carbon-data/deforest_carbon_100m_cog.tif"
24
 
 
 
 
 
25
  m = leafmap.Map(center=[41, -69], zoom=5)
26
  m.add_cog_layer(
27
  deforest,
@@ -39,6 +43,9 @@ m.add_cog_layer(
39
  opacity=0.5,
40
  zoom_to_layer=False,
41
  )
 
 
 
42
 
43
 
44
  polygon_ex ='{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.628906,34.741612],[-124.628906,42.423457],[-117.246094,42.423457],[-117.246094,34.741612],[-124.628906,34.741612]]]}}'
 
22
  hi = "https://data.source.coop/vizzuality/hfp-100/hfp_2021_100m_v1-2_cog.tif"
23
  deforest = "https://data.source.coop/vizzuality/lg-land-carbon-data/deforest_carbon_100m_cog.tif"
24
 
25
+ # Euromap info
26
+ eurocrops_pmtiles = "https://s3.us-west-2.amazonaws.com/us-west-2.opendata.source.coop/cholmes/eurocrops/eurocrops-all.pmtiles"
27
+ ec_style = leafmap.pmtiles_style(eurocrops_pmtiles)
28
+
29
  m = leafmap.Map(center=[41, -69], zoom=5)
30
  m.add_cog_layer(
31
  deforest,
 
43
  opacity=0.5,
44
  zoom_to_layer=False,
45
  )
46
+ m.add_pmtiles(
47
+ eurocrops_pmtiles, name="euro crops", style=ec_style, overlay=True, show=True, zoom_to_layer=False
48
+ )
49
 
50
 
51
  polygon_ex ='{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-124.628906,34.741612],[-124.628906,42.423457],[-117.246094,42.423457],[-117.246094,34.741612],[-124.628906,34.741612]]]}}'