-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
59 lines (58 loc) · 1.32 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
var GeoApp = GeoApp || {}
GeoApp.config = {
style: 'mapbox://styles/mapbox/dark-v9', // 'mapbox://styles/mapbox/dark-v9' 'mapbox://styles/stefanoparodi/cj8zs4h59byfm2slhym11xhl4'
sources: [
{
name: 'toponimi',
type: 'geojson',
url: '/geoservices/data/toponimi.json',
},
{
name: 'edifici',
type: 'geojson',
url: '/geoservices/data/edifici.json',
},
],
layers: [
{
type: 'heatmap',
source: 'toponimi',
paint: {
opacity: {
default: 1,
stops: [[9, 1], [13, 0]],
},
},
before: 'waterway-label',
},
{
type: 'circle',
source: 'toponimi',
minzoom: 12,
paint: {
color: 'blue',
radius: 8,
},
before: 'waterway-label',
popup: 'basic',
},
{
type: 'fill-extrusion',
source: 'edifici',
minzoom: 12,
paint: {
color: '#aaa',
height: { property: 'Q_EDIFICIO', type: 'identity' },
//base: { property: 'base_height', type: 'identity' }
},
before: 'waterway-label',
popup: 'basic',
},
],
onClick: function(map, e) {
new mapboxgl.Popup()
.setLngLat(e.features[0].geometry.coordinates)
.setHTML('<b>Toponimo:</b><br /> ' + e.features[0].properties['NOME'])
.addTo(map)
},
}