-
Notifications
You must be signed in to change notification settings - Fork 1
/
codejs.py
73 lines (56 loc) · 944 Bytes
/
codejs.py
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
codejs1 = """M.proxy(proxy);
mapajs = M.map({
container: "map",
controls:"""
codejs2 =""",
// zoom: 7,
bbox : bb,
wmcfiles: basemaps
});
"""
pointSyle = """
// Define estilo punto
let estiloLayer = new M.style.Point({
radius: 5,
fill: {
color: fillColor
//opacity: 0.5
},
stroke: {
color: '#FFFFFF',
width: 2
}
});
"""
polygonStyle = """
// Define estilo polygon
let estiloLayer = new M.style.Polygon({
//radius: 5,
fill: {
color: fillColor,
opacity: 0.5,
},
stroke: {
color: '#FF0000',
width: 2
}
});
"""
lineStyle = """
// Define estilo line
let estiloLayer = new M.style.Line({
fill: {
color: fillColor,
width: 2
}
});
"""
codejs3="""
// Crea capa
var layerQGIS2Mapea4 = new M.layer.GeoJSON(
{name: layerName,
source: geo
});
layerQGIS2Mapea4.setStyle(estiloLayer);
mapajs.addLayers(layerQGIS2Mapea4);
"""