giswqs commited on
Commit
2a6f3c4
1 Parent(s): 7c448cb

Update example

Browse files
Files changed (1) hide show
  1. pages/03_pmtiles.py +4 -9
pages/03_pmtiles.py CHANGED
@@ -1,5 +1,6 @@
1
  import leafmap
2
  import solara
 
3
 
4
 
5
  zoom = solara.reactive(2)
@@ -15,14 +16,6 @@ class Map(leafmap.Map):
15
  url = "https://storage.googleapis.com/ahp-research/overture/pmtiles/overture.pmtiles"
16
 
17
  style={
18
- "version": 8,
19
- "sources": {
20
- "example_source": {
21
- "type": "vector",
22
- "url": "pmtiles://" + url,
23
- "attribution": 'PMTiles',
24
- }
25
- },
26
  "layers": [
27
  {
28
  "id": "admins",
@@ -55,7 +48,9 @@ class Map(leafmap.Map):
55
  ],
56
  }
57
 
58
- self.add_pmtiles(url, name='PMTiles', style=style)
 
 
59
 
60
  legend_dict = {
61
  'admins': 'BDD3C7',
 
1
  import leafmap
2
  import solara
3
+ import ipyleaflet
4
 
5
 
6
  zoom = solara.reactive(2)
 
16
  url = "https://storage.googleapis.com/ahp-research/overture/pmtiles/overture.pmtiles"
17
 
18
  style={
 
 
 
 
 
 
 
 
19
  "layers": [
20
  {
21
  "id": "admins",
 
48
  ],
49
  }
50
 
51
+ layer = ipyleaflet.PMTilesLayer(url=url, style=style)
52
+ self.add(layer)
53
+ # self.add_pmtiles(url, name='PMTiles', style=style)
54
 
55
  legend_dict = {
56
  'admins': 'BDD3C7',