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
c2d6f18a
Commit
c2d6f18a
authored
Sep 06, 2019
by
Rodrigo Tapia-McClung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to arrow functions
parent
b34bf9c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
grijalva_basemap.js
public/fordecyt_2019/js/grijalva_basemap.js
+8
-8
grijalva_functions.js
public/fordecyt_2019/js/grijalva_functions.js
+4
-4
No files found.
public/fordecyt_2019/js/grijalva_basemap.js
View file @
c2d6f18a
...
@@ -169,7 +169,7 @@ let layer_escuelas = new L.geoJson(null, {
...
@@ -169,7 +169,7 @@ let layer_escuelas = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_escuelas"
,
pane
:
"pane_escuelas"
,
//onEachFeature: pop_escuelas,
//onEachFeature: pop_escuelas,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -196,7 +196,7 @@ let layer_hospitales = new L.geoJson(null, {
...
@@ -196,7 +196,7 @@ let layer_hospitales = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_hospitales"
,
pane
:
"pane_hospitales"
,
//onEachFeature: pop_hospitales,
//onEachFeature: pop_hospitales,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -224,7 +224,7 @@ let layer_hoteles = new L.geoJson(null, {
...
@@ -224,7 +224,7 @@ let layer_hoteles = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_hoteles"
,
pane
:
"pane_hoteles"
,
//onEachFeature: pop_hoteles,
//onEachFeature: pop_hoteles,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -251,7 +251,7 @@ let layer_puentes = new L.geoJson(null, {
...
@@ -251,7 +251,7 @@ let layer_puentes = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_puentes"
,
pane
:
"pane_puentes"
,
//onEachFeature: pop_puentes,
//onEachFeature: pop_puentes,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// var context = {
// var context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -279,7 +279,7 @@ let layer_puerto = new L.geoJson(null, {
...
@@ -279,7 +279,7 @@ let layer_puerto = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_puerto"
,
pane
:
"pane_puerto"
,
//onEachFeature: pop_puerto,
//onEachFeature: pop_puerto,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -307,7 +307,7 @@ let layer_frontera = new L.geoJson(null, {
...
@@ -307,7 +307,7 @@ let layer_frontera = new L.geoJson(null, {
pane
:
"pane_frontera"
,
pane
:
"pane_frontera"
,
//onEachFeature: pop_frontera,
//onEachFeature: pop_frontera,
styles
:
null
,
styles
:
null
,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -334,7 +334,7 @@ let layer_descargas = new L.geoJson(null, {
...
@@ -334,7 +334,7 @@ let layer_descargas = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_descargas"
,
pane
:
"pane_descargas"
,
//onEachFeature: pop_descargas,
//onEachFeature: pop_descargas,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
@@ -361,7 +361,7 @@ let layer_presas = new L.geoJson(null, {
...
@@ -361,7 +361,7 @@ let layer_presas = new L.geoJson(null, {
attribution
:
""
,
attribution
:
""
,
pane
:
"pane_presas"
,
pane
:
"pane_presas"
,
//onEachFeature: pop_presas,
//onEachFeature: pop_presas,
pointToLayer
:
function
(
feature
,
latlng
)
{
pointToLayer
:
(
_feature
,
latlng
)
=>
{
// let context = {
// let context = {
// feature: feature,
// feature: feature,
// variables: {}
// variables: {}
...
...
public/fordecyt_2019/js/grijalva_functions.js
View file @
c2d6f18a
...
@@ -282,7 +282,7 @@ const setupMap = (dates) => {
...
@@ -282,7 +282,7 @@ const setupMap = (dates) => {
L
.
control
.
attribution
({
position
:
"bottomright"
}).
addTo
(
overlay
);
L
.
control
.
attribution
({
position
:
"bottomright"
}).
addTo
(
overlay
);
// on base layer on main map, change base layer on overlay map
// on base layer on main map, change base layer on overlay map
map
.
on
(
"baselayerchange"
,
function
(
event
)
{
map
.
on
(
"baselayerchange"
,
event
=>
{
overlay
.
eachLayer
(
l
=>
overlay
.
removeLayer
(
l
));
overlay
.
eachLayer
(
l
=>
overlay
.
removeLayer
(
l
));
if
(
event
.
name
==
"Carto Dark"
)
{
if
(
event
.
name
==
"Carto Dark"
)
{
cartoDarkLayerOverlay
.
addTo
(
overlay
);
cartoDarkLayerOverlay
.
addTo
(
overlay
);
...
@@ -293,9 +293,7 @@ const setupMap = (dates) => {
...
@@ -293,9 +293,7 @@ const setupMap = (dates) => {
}
}
});
});
map
.
sync
(
overlay
,
{
offsetFn
:
offsetGlobal
});
const
offsetGlobal
=
(
center
,
zoom
,
refMap
,
tgtMap
)
=>
{
function
offsetGlobal
(
center
,
zoom
,
refMap
,
tgtMap
)
{
var
refC
=
refMap
.
getContainer
();
var
refC
=
refMap
.
getContainer
();
var
tgtC
=
tgtMap
.
getContainer
();
var
tgtC
=
tgtMap
.
getContainer
();
var
pt
=
refMap
.
project
(
center
,
zoom
)
var
pt
=
refMap
.
project
(
center
,
zoom
)
...
@@ -306,6 +304,8 @@ const setupMap = (dates) => {
...
@@ -306,6 +304,8 @@ const setupMap = (dates) => {
return
refMap
.
unproject
(
pt
,
zoom
);
return
refMap
.
unproject
(
pt
,
zoom
);
}
}
map
.
sync
(
overlay
,
{
offsetFn
:
offsetGlobal
});
//console.log(userFiles);
//console.log(userFiles);
// query db to get min/max values per month and indicator and store them in an object
// query db to get min/max values per month and indicator and store them in an object
queryFiles
().
then
(
minmax
=>
{
queryFiles
().
then
(
minmax
=>
{
...
...
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