Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fordecyt_2019
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rodrigo Tapia-McClung
fordecyt_2019
Commits
a4286f38
Commit
a4286f38
authored
Sep 12, 2019
by
Rodrigo Tapia-McClung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'return period' image overlays
parent
5fd8543c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
173 additions
and
131 deletions
+173
-131
riesgos_basemap.js
public/fordecyt_2019/js/riesgos_basemap.js
+173
-131
inunda_002rt.png
public/fordecyt_2019/riesgos/data/inunda_002rt.png
+0
-0
inunda_005rt.png
public/fordecyt_2019/riesgos/data/inunda_005rt.png
+0
-0
inunda_010rt.png
public/fordecyt_2019/riesgos/data/inunda_010rt.png
+0
-0
inunda_050rt.png
public/fordecyt_2019/riesgos/data/inunda_050rt.png
+0
-0
inunda_100rt.png
public/fordecyt_2019/riesgos/data/inunda_100rt.png
+0
-0
No files found.
public/fordecyt_2019/js/riesgos_basemap.js
View file @
a4286f38
...
@@ -214,7 +214,7 @@ let layer_pistasaereas = new L.geoJson(null, {
...
@@ -214,7 +214,7 @@ let layer_pistasaereas = new L.geoJson(null, {
borderWidth
:
0
,
borderWidth
:
0
,
borderColor
:
"transparent"
,
borderColor
:
"transparent"
,
backgroundColor
:
"transparent"
//,
backgroundColor
:
"transparent"
//,
// textColor: "#C0C0C0"
// textColor: "#C0C0C0"
});
});
return
new
L
.
Marker
(
latlng
,
{
return
new
L
.
Marker
(
latlng
,
{
icon
:
avionMarker
icon
:
avionMarker
...
@@ -247,7 +247,7 @@ let layer_autobuses = new L.geoJson(null, {
...
@@ -247,7 +247,7 @@ let layer_autobuses = new L.geoJson(null, {
borderWidth
:
0
,
borderWidth
:
0
,
borderColor
:
"transparent"
,
borderColor
:
"transparent"
,
backgroundColor
:
"transparent"
//,
backgroundColor
:
"transparent"
//,
// textColor: "#C0C0C0"
// textColor: "#C0C0C0"
});
});
return
new
L
.
Marker
(
latlng
,
{
return
new
L
.
Marker
(
latlng
,
{
icon
:
busMarker
icon
:
busMarker
...
@@ -404,7 +404,7 @@ const style_cuencas = feature => {
...
@@ -404,7 +404,7 @@ const style_cuencas = feature => {
weight
:
1.0
,
weight
:
1.0
,
fill
:
true
,
fill
:
true
,
fillOpacity
:
1
,
fillOpacity
:
1
,
fillColor
:
getCuencasColor
(
feature
.
properties
[
'Subregion'
])
fillColor
:
getCuencasColor
(
feature
.
properties
[
"Subregion"
])
}
}
}
}
let
layer_cuencas
=
new
L
.
geoJson
(
null
,
{
let
layer_cuencas
=
new
L
.
geoJson
(
null
,
{
...
@@ -436,34 +436,34 @@ let layer_limZMs = new L.geoJson(null, {
...
@@ -436,34 +436,34 @@ let layer_limZMs = new L.geoJson(null, {
const
style_ZMs
=
feature
=>
{
const
style_ZMs
=
feature
=>
{
switch
(
String
(
feature
.
properties
[
"ZM_NOMBRE"
]))
{
switch
(
String
(
feature
.
properties
[
"ZM_NOMBRE"
]))
{
case
"Tuxtla Gutiérrez"
:
case
"Tuxtla Gutiérrez"
:
return
{
return
{
pane
:
"pane_ZMs"
,
pane
:
"pane_ZMs"
,
opacity
:
1
,
opacity
:
1
,
color
:
"rgba(139,47,0,0.6)"
,
color
:
"rgba(139,47,0,0.6)"
,
dashArray
:
""
,
dashArray
:
""
,
lineCap
:
"butt"
,
lineCap
:
"butt"
,
lineJoin
:
"miter"
,
lineJoin
:
"miter"
,
weight
:
1.0
,
weight
:
1.0
,
fill
:
true
,
fill
:
true
,
fillOpacity
:
1
,
fillOpacity
:
1
,
fillColor
:
"rgba(139,60,0,0.6)"
fillColor
:
"rgba(139,60,0,0.6)"
}
}
//break;
//break;
case
"Villahermosa"
:
case
"Villahermosa"
:
return
{
return
{
pane
:
"pane_ZMs"
,
pane
:
"pane_ZMs"
,
opacity
:
1
,
opacity
:
1
,
color
:
"rgba(139,47,0,0.6)"
,
color
:
"rgba(139,47,0,0.6)"
,
dashArray
:
""
,
dashArray
:
""
,
lineCap
:
"butt"
,
lineCap
:
"butt"
,
lineJoin
:
"miter"
,
lineJoin
:
"miter"
,
weight
:
1.0
,
weight
:
1.0
,
fill
:
true
,
fill
:
true
,
fillOpacity
:
1
,
fillOpacity
:
1
,
fillColor
:
"rgba(207,152,62,0.6)"
fillColor
:
"rgba(207,152,62,0.6)"
}
}
//break;
//break;
}
}
}
}
...
@@ -485,7 +485,7 @@ const style_agebsbypop = feature => {
...
@@ -485,7 +485,7 @@ const style_agebsbypop = feature => {
weight
:
0.5
,
//1.0,
weight
:
0.5
,
//1.0,
fill
:
true
,
fill
:
true
,
fillOpacity
:
0.7
,
//1,
fillOpacity
:
0.7
,
//1,
fillColor
:
getPoblacionColor
(
feature
.
properties
[
'POBTOT'
])
fillColor
:
getPoblacionColor
(
feature
.
properties
[
"POBTOT"
])
}
}
}
}
...
@@ -507,7 +507,7 @@ const style_agebsbydens = feature => {
...
@@ -507,7 +507,7 @@ const style_agebsbydens = feature => {
weight
:
0.5
,
//1.0,
weight
:
0.5
,
//1.0,
fill
:
true
,
fill
:
true
,
fillOpacity
:
0.5
,
//1,
fillOpacity
:
0.5
,
//1,
fillColor
:
getDensidadColor
(
feature
.
properties
[
'DENPOB_KM2'
])
//"rgba(0,240,2,0.05)"
fillColor
:
getDensidadColor
(
feature
.
properties
[
"DENPOB_KM2"
])
//"rgba(0,240,2,0.05)"
}
}
}
}
...
@@ -530,7 +530,7 @@ let layer_agricolapv = {
...
@@ -530,7 +530,7 @@ let layer_agricolapv = {
maxzoom
:
19
,
maxzoom
:
19
,
minzoom
:
6
minzoom
:
6
},
},
"source-layer"
:
"agricola_pv"
,
// source has to match postgi table name
"source-layer"
:
"agricola_pv"
,
// source has to match postgi
s
table name
type
:
"fill"
,
type
:
"fill"
,
paint
:
{
paint
:
{
"fill-opacity"
:
0
,
"fill-opacity"
:
0
,
...
@@ -557,7 +557,7 @@ let layer_agricolaoi = {
...
@@ -557,7 +557,7 @@ let layer_agricolaoi = {
maxzoom
:
19
,
maxzoom
:
19
,
minzoom
:
6
minzoom
:
6
},
},
"source-layer"
:
"agricola_oi"
,
// source has to match postgi table name
"source-layer"
:
"agricola_oi"
,
// source has to match postgi
s
table name
type
:
"fill"
,
type
:
"fill"
,
paint
:
{
paint
:
{
"fill-opacity"
:
0
,
"fill-opacity"
:
0
,
...
@@ -575,6 +575,28 @@ let layer_agricolaoi = {
...
@@ -575,6 +575,28 @@ let layer_agricolaoi = {
]
]
}
}
}
}
let
layer_retorno2
=
L
.
imageOverlay
(
"data/inunda_002rt.png"
,
[[
18.8249
,
-
94.4231
],
[
15.0813
,
-
91.5209
]],
{
opacity
:
0.5
}
),
layer_retorno5
=
L
.
imageOverlay
(
"data/inunda_005rt.png"
,
[[
18.8249
,
-
94.4231
],
[
15.0813
,
-
91.5209
]],
{
opacity
:
0.5
}
),
layer_retorno10
=
L
.
imageOverlay
(
"data/inunda_010rt.png"
,
[[
18.8249
,
-
94.4231
],
[
15.0813
,
-
91.5209
]],
{
opacity
:
0.5
}
),
layer_retorno50
=
L
.
imageOverlay
(
"data/inunda_050rt.png"
,
[[
18.8249
,
-
94.4231
],
[
15.0813
,
-
91.5209
]],
{
opacity
:
0.5
}
),
layer_retorno100
=
L
.
imageOverlay
(
"data/inunda_100rt.png"
,
[[
18.8249
,
-
94.4231
],
[
15.0813
,
-
91.5209
]],
{
opacity
:
0.5
}
);
const
styleDrawnItems
=
()
=>
{
const
styleDrawnItems
=
()
=>
{
let
currentId
=
0
;
let
currentId
=
0
;
drawnItems
.
eachLayer
(
l
=>
{
drawnItems
.
eachLayer
(
l
=>
{
...
@@ -657,12 +679,19 @@ const makeBaseMap = () => {
...
@@ -657,12 +679,19 @@ const makeBaseMap = () => {
zip2Lyr
(
"../riesgos/data/Bancos.zip"
,
bancos
,
layer_bancos
);
zip2Lyr
(
"../riesgos/data/Bancos.zip"
,
bancos
,
layer_bancos
);
layerControl
.
addOverlay
(
layer_bancos
,
"<span class =
\"
fa fa-stack
\"
style=
\"
padding-top: 6px;
\"
><i class=
\"
fas fa-desechos fa-stack-1x
\"
style=
\"
color:#05ac72;
\"
></i><i class=
\"
fas fa-dollar fa-stack-1x fa-inverse
\"
></i></span>Bancos"
);
layerControl
.
addOverlay
(
layer_bancos
,
"<span class =
\"
fa fa-stack
\"
style=
\"
padding-top: 6px;
\"
><i class=
\"
fas fa-desechos fa-stack-1x
\"
style=
\"
color:#05ac72;
\"
></i><i class=
\"
fas fa-dollar fa-stack-1x fa-inverse
\"
></i></span>Bancos"
);
layerControl
.
addOverlay
(
layer_vferreas
,
"<img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/mdm6wms?map=/opt/map/mdm60/mdm61leyendaprueba.map&Request=GetLegendGraphic&format=image/png&Version=1.1.1&Service=WMS&LAYER=c202
\"
alt=
\"
Vías Férreas
\"
/>"
);
layerControl
.
addOverlay
(
layer_vferreas
,
"<img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/mdm6wms?map=/opt/map/mdm60/mdm61leyendaprueba.map&Request=GetLegendGraphic&format=image/png&Version=1.1.1&Service=WMS&LAYER=c202
\"
alt=
\"
Vías Férreas
\"
/>"
);
// add agriculture tiles to map and add fake overlay to control their opacity
glmap
.
getMapboxMap
().
addLayer
(
layer_agricolaoi
);
glmap
.
getMapboxMap
().
addLayer
(
layer_agricolaoi
);
layerControl
.
addOverlay
(
layer_agricolaoi_fake
,
"Ciclo agrícola (Otoño-Invierno), SIAP-SADER 2017-2018 <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d1ff73
\"
stroke=
\"
#aaff00
\"
stroke-dasharray=
\"
\"
></rect></svg> Maíz grano<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8e1973
\"
stroke =
\"
#a80084
\"
stroke-dasharray=
\"
\"
></rect></svg> Frijol<br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ff5500
\"
stroke =
\"
#e60000
\"
stroke-dasharray=
\"
\"
></rect></svg> Sorgo grano"
);
layerControl
.
addOverlay
(
layer_agricolaoi_fake
,
"Ciclo agrícola (Otoño-Invierno), SIAP-SADER 2017-2018 <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d1ff73
\"
stroke=
\"
#aaff00
\"
stroke-dasharray=
\"
\"
></rect></svg> Maíz grano<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8e1973
\"
stroke =
\"
#a80084
\"
stroke-dasharray=
\"
\"
></rect></svg> Frijol<br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ff5500
\"
stroke =
\"
#e60000
\"
stroke-dasharray=
\"
\"
></rect></svg> Sorgo grano"
);
//map.addLayer(layer_agricolaoi_fake);
glmap
.
getMapboxMap
().
addLayer
(
layer_agricolapv
);
glmap
.
getMapboxMap
().
addLayer
(
layer_agricolapv
);
//map.addLayer(layer_agricolapv_fake);
layerControl
.
addOverlay
(
layer_agricolapv_fake
,
"Ciclo agrícola (Primavera-Verano), SIAP-SADER 2017 <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d1ff73
\"
stroke=
\"
#aaff00
\"
stroke-dasharray=
\"
\"
></rect></svg> Maíz grano<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8e1973
\"
stroke =
\"
#a80084
\"
stroke-dasharray=
\"
\"
></rect></svg> Frijol<br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ff5500
\"
stroke =
\"
#e60000
\"
stroke-dasharray=
\"
\"
></rect></svg> Sorgo grano"
);
layerControl
.
addOverlay
(
layer_agricolapv_fake
,
"Ciclo agrícola (Primavera-Verano), SIAP-SADER 2017 <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d1ff73
\"
stroke=
\"
#aaff00
\"
stroke-dasharray=
\"
\"
></rect></svg> Maíz grano<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8e1973
\"
stroke =
\"
#a80084
\"
stroke-dasharray=
\"
\"
></rect></svg> Frijol<br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ff5500
\"
stroke =
\"
#e60000
\"
stroke-dasharray=
\"
\"
></rect></svg> Sorgo grano"
);
layerControl
.
addOverlay
(
layer_retorno2
,
"Periodo de retorno a 2 años"
);
layerControl
.
addOverlay
(
layer_retorno5
,
"Periodo de retorno a 5 años"
);
layerControl
.
addOverlay
(
layer_retorno10
,
"Periodo de retorno a 10 años"
);
layerControl
.
addOverlay
(
layer_retorno50
,
"Periodo de retorno a 50 años"
);
layerControl
.
addOverlay
(
layer_retorno100
,
"Periodo de retorno a 100 años"
);
zip2Lyr
(
"../riesgos/data/poblacionAGEB.zip"
,
agebsbydens
,
layer_agebsbydens
);
zip2Lyr
(
"../riesgos/data/poblacionAGEB.zip"
,
agebsbydens
,
layer_agebsbydens
);
layerControl
.
addOverlay
(
layer_agebsbydens
,
"Densidad de población total por AGEB <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ffffff
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> Sin Población<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#f1f0fc
\"
stroke =
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 1 - 2400 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d2d3fa
\"
stroke =
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 2401 - 7000 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#a6a2eb
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 7001 - 11500 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8c6fbd
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 11501 - 16000 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#633096
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 16001 - 67000"
);
layerControl
.
addOverlay
(
layer_agebsbydens
,
"Densidad de población total por AGEB <br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#ffffff
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> Sin Población<br /> <svg height=
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#f1f0fc
\"
stroke =
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 1 - 2400 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#d2d3fa
\"
stroke =
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 2401 - 7000 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#a6a2eb
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 7001 - 11500 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#8c6fbd
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 11501 - 16000 <br/> <svg height =
\"
15
\"
width=
\"
15
\"
><path d=
\"
M0 0 L15 0 L15 10 L0 10 Z
\"
x=
\"
5
\"
y=
\"
5
\"
fill=
\"
#633096
\"
stroke=
\"
rgba(0,0,0,0.6)
\"
stroke-dasharray=
\"
\"
></rect></svg> 16001 - 67000"
);
zip2Lyr
(
"../riesgos/data/poblacionAGEB.zip"
,
agebsbypop
,
layer_agebsbypop
);
zip2Lyr
(
"../riesgos/data/poblacionAGEB.zip"
,
agebsbypop
,
layer_agebsbypop
);
...
@@ -678,6 +707,7 @@ const makeBaseMap = () => {
...
@@ -678,6 +707,7 @@ const makeBaseMap = () => {
layerControl
.
addOverlay
(
layer_limiteMunicipal
,
"<img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/wms61?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=c101&format=image/png&STYLE=default
\"
alt=
\"
Límite municipal
\"
/>"
);
layerControl
.
addOverlay
(
layer_limiteMunicipal
,
"<img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/wms61?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=c101&format=image/png&STYLE=default
\"
alt=
\"
Límite municipal
\"
/>"
);
layerControl
.
addOverlay
(
layer_limiteEstatal
,
"Límite estatal <br /> <img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/wms61?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=c100&format=image/png&STYLE=default
\"
alt=
\"
Límite Estatal
\"
/>"
);
layerControl
.
addOverlay
(
layer_limiteEstatal
,
"Límite estatal <br /> <img src=
\"
http://gaia.inegi.org.mx/NLB/tunnel/wms/wms61?version=1.3.0&service=WMS&request=GetLegendGraphic&sld_version=1.1.0&layer=c100&format=image/png&STYLE=default
\"
alt=
\"
Límite Estatal
\"
/>"
);
// set agriculture tiles' opacity to 0 or 1 depending on the case
map
.
on
(
"overlayadd"
,
event
=>
{
map
.
on
(
"overlayadd"
,
event
=>
{
if
(
event
.
name
.
includes
(
"Primavera-Verano"
))
{
if
(
event
.
name
.
includes
(
"Primavera-Verano"
))
{
glmap
.
getMapboxMap
().
setPaintProperty
(
"agricola_pv"
,
"fill-opacity"
,
1
);
glmap
.
getMapboxMap
().
setPaintProperty
(
"agricola_pv"
,
"fill-opacity"
,
1
);
...
@@ -692,117 +722,129 @@ const makeBaseMap = () => {
...
@@ -692,117 +722,129 @@ const makeBaseMap = () => {
if
(
event
.
name
.
includes
(
"Otoño-Invierno"
))
{
if
(
event
.
name
.
includes
(
"Otoño-Invierno"
))
{
glmap
.
getMapboxMap
().
setPaintProperty
(
"agricola_oi"
,
"fill-opacity"
,
0
);
glmap
.
getMapboxMap
().
setPaintProperty
(
"agricola_oi"
,
"fill-opacity"
,
0
);
}
}
})
});
// show loader only first time PNG overlays are loaded
layer_retorno2
.
once
(
"add"
,
()
=>
$
(
".loader"
).
css
(
"display"
,
"block"
))
.
on
(
"load"
,
()
=>
$
(
".loader"
).
hide
(
"fade"
,
750
));
layer_retorno5
.
once
(
"add"
,
()
=>
$
(
".loader"
).
css
(
"display"
,
"block"
))
.
on
(
"load"
,
()
=>
$
(
".loader"
).
hide
(
"fade"
,
750
));
layer_retorno10
.
once
(
"add"
,
()
=>
$
(
".loader"
).
css
(
"display"
,
"block"
))
.
on
(
"load"
,
()
=>
$
(
".loader"
).
hide
(
"fade"
,
750
));
layer_retorno50
.
once
(
"add"
,
()
=>
$
(
".loader"
).
css
(
"display"
,
"block"
))
.
on
(
"load"
,
()
=>
$
(
".loader"
).
hide
(
"fade"
,
750
));
layer_retorno100
.
once
(
"add"
,
()
=>
$
(
".loader"
).
css
(
"display"
,
"block"
))
.
on
(
"load"
,
()
=>
$
(
".loader"
).
hide
(
"fade"
,
750
));
// Localize Leaflet.Draw texts
// Localize Leaflet.Draw texts
L
.
drawLocal
=
{
L
.
drawLocal
=
{
draw
:
{
draw
:
{
toolbar
:
{
toolbar
:
{
actions
:
{
actions
:
{
title
:
"Cancelar dibujo"
,
title
:
"Cancelar dibujo"
,
text
:
"Cancelar"
text
:
"Cancelar"
},
},
finish
:
{
finish
:
{
title
:
"Terminar dibujo"
,
title
:
"Terminar dibujo"
,
text
:
"Terminar"
text
:
"Terminar"
},
},
undo
:
{
undo
:
{
title
:
"Eliminar último punto dibujado"
,
title
:
"Eliminar último punto dibujado"
,
text
:
"Eliminar último punto"
text
:
"Eliminar último punto"
},
buttons
:
{
polyline
:
"Dibujar una polilínea"
,
polygon
:
"Dibujar un polígono"
,
rectangle
:
"Dibujar un rectángulo"
,
circle
:
"Dibujar un círculo"
,
marker
:
"Dibujar un marcador"
,
circlemarker
:
"Dibujar un marcador circular"
}
},
handlers
:
{
circle
:
{
tooltip
:
{
start
:
"Haz click y arrastra para dibujar un círculo"
},
},
buttons
:
{
radius
:
"Radio"
polyline
:
"Dibujar una polilínea"
,
},
polygon
:
"Dibujar un polígono"
,
circlemarker
:
{
rectangle
:
"Dibujar un rectángulo"
,
tooltip
:
{
circle
:
"Dibujar un círculo"
,
start
:
"Haz click en el mapa para ubicar el marcador circular"
marker
:
"Dibujar un marcador"
,
circlemarker
:
"Dibujar un marcador circular"
}
}
},
},
handlers
:
{
marker
:
{
circle
:
{
tooltip
:
{
tooltip
:
{
start
:
"Haz click en el mapa para ubicar el marcador"
start
:
"Haz click y arrastra para dibujar un círculo"
}
},
},
radius
:
"Radio"
polygon
:
{
},
error
:
"<strong>Error:</strong>"
,
circlemarker
:
{
tooltip
:
{
tooltip
:
{
start
:
"Haz click para empezar a dibujar la figura"
,
start
:
"Haz click en el mapa para ubicar el marcador circular"
cont
:
"Haz click para continuar dibujando la figura"
,
}
end
:
"Haz click en el primer punto para cerrar la figura"
},
}
marker
:
{
},
tooltip
:
{
polyline
:
{
start
:
"Haz click en el mapa para ubicar el marcador"
error
:
"<strong>Error:</strong> las líneas no deben cruzarse"
,
}
tooltip
:
{
},
start
:
"Haz click para empezar a dibujar la línea"
,
polygon
:
{
cont
:
"Haz click para continuar dibujando la línea"
,
error
:
"<strong>Error:</strong>"
,
end
:
"Haz click en el último punto para terminar la línea"
tooltip
:
{
}
start
:
"Haz click para empezar a dibujar la figura"
,
},
cont
:
"Haz click para continuar dibujando la figura"
,
rectangle
:
{
end
:
"Haz click en el primer punto para cerrar la figura"
tooltip
:
{
}
start
:
"Haz click y arrastra para dibujar un rectángulo"
},
}
polyline
:
{
},
error
:
"<strong>Error:</strong> las líneas no deben cruzarse"
,
simpleshape
:
{
tooltip
:
{
tooltip
:
{
start
:
"Haz click para empezar a dibujar la línea"
,
end
:
"Suelta el ratón para terminar de dibujar"
cont
:
"Haz click para continuar dibujando la línea"
,
}
end
:
"Haz click en el último punto para terminar la línea"
}
}
}
},
edit
:
{
toolbar
:
{
actions
:
{
save
:
{
title
:
"Guardar los cambios"
,
text
:
"Guardar"
},
},
rectangle
:
{
cancel
:
{
tooltip
:
{
title
:
"Cancelar la edición, descarta todos los cambios"
,
start
:
"Haz click y arrastra para dibujar un rectángulo"
text
:
"Cancelar"
}
},
},
simpleshape
:
{
clearAll
:
{
tooltip
:
{
title
:
"Limpiar todas las capas"
,
end
:
"Suelta el ratón para terminar de dibujar"
text
:
"Limpiar todo"
}
}
}
},
buttons
:
{
edit
:
"Editar capas"
,
editDisabled
:
"No hay capas que editar"
,
remove
:
"Eliminar capas"
,
removeDisabled
:
"No hay capas que eliminar"
}
}
},
},
edit
:
{
handlers
:
{
toolbar
:
{
edit
:
{
actions
:
{
tooltip
:
{
save
:
{
text
:
"Arrastra el marcador para editar la figura"
,
title
:
"Guardar los cambios"
,
subtext
:
"Haz click en cancelar para deshacer los cambios"
text
:
"Guardar"
},
cancel
:
{
title
:
"Cancelar la edición, descarta todos los cambios"
,
text
:
"Cancelar"
},
clearAll
:
{
title
:
"Limpiar todas las capas"
,
text
:
"Limpiar todo"
}
},
buttons
:
{
edit
:
"Editar capas"
,
editDisabled
:
"No hay capas que editar"
,
remove
:
"Eliminar capas"
,
removeDisabled
:
"No hay capas que eliminar"
}
}
},
},
handlers
:
{
remove
:
{
edit
:
{
tooltip
:
{
tooltip
:
{
text
:
"Haz click en una figura para eliminarla"
text
:
"Arrastra el marcador para editar la figura"
,
subtext
:
"Haz click en cancelar para deshacer los cambios"
}
},
remove
:
{
tooltip
:
{
text
:
"Haz click en una figura para eliminarla"
}
}
}
}
}
}
}
}
}
// leaflet draw control
}
// leaflet draw control
drawnItems
=
L
.
featureGroup
().
addTo
(
map
);
drawnItems
=
L
.
featureGroup
().
addTo
(
map
);
let
drawControl
=
new
L
.
Control
.
Draw
({
let
drawControl
=
new
L
.
Control
.
Draw
({
...
...
public/fordecyt_2019/riesgos/data/inunda_002rt.png
0 → 100644
View file @
a4286f38
2.65 MB
public/fordecyt_2019/riesgos/data/inunda_005rt.png
0 → 100644
View file @
a4286f38
3.05 MB
public/fordecyt_2019/riesgos/data/inunda_010rt.png
0 → 100644
View file @
a4286f38
3.33 MB
public/fordecyt_2019/riesgos/data/inunda_050rt.png
0 → 100644
View file @
a4286f38
3.97 MB
public/fordecyt_2019/riesgos/data/inunda_100rt.png
0 → 100644
View file @
a4286f38
4.43 MB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment