File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 37
37
map . on ( 'load' , function ( ) {
38
38
map . addSource ( 'pmtiles-source' , {
39
39
type : 'vector' ,
40
- // url: 'pmtiles://http://127.0.0.1:8000/complete .pmtiles'
40
+ // url: 'pmtiles://http://127.0.0.1:8000/86873 .pmtiles' // use this when developing locally
41
41
url : 'pmtiles://https://s3.cl4.du.cesnet.cz/4f4743b6_4043_4e02_a3ba_0452aa7523a2:uscuni-public/complete.pmtiles'
42
42
} ) ;
43
43
109
109
// add regions hulls for debugging purposes
110
110
map . addSource ( 'geojson-source' , {
111
111
type : 'geojson' ,
112
- // data: 'http://127.0.0.1:8000/regions.geojson'
112
+ // data: 'http://127.0.0.1:8000/regions.geojson' // use this when developing locally
113
113
data : 'https://uscuni.org/himoc/regions.geojson'
114
114
} ) ;
115
115
124
124
}
125
125
} ) ;
126
126
127
+ map . on ( 'click' , 'geojson-layer' , function ( e ) {
128
+ new maplibregl . Popup ( )
129
+ . setLngLat ( e . lngLat )
130
+ . setHTML ( e . features [ 0 ] . properties . labels )
131
+ . addTo ( map ) ;
132
+ } ) ;
133
+
127
134
// add layer control
128
135
const layers = [
129
136
{ id : 'pmtiles-layer' , name : 'Buildings' } ,
You can’t perform that action at this time.
0 commit comments