Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Asc Geostac
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Asc Geostac
Commits
1f1597d0
Commit
1f1597d0
authored
1 year ago
by
Zack
Browse files
Options
Downloads
Patches
Plain Diff
added headers to some methods
parent
66e1535f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/js/AstroMap.js
+14
-4
14 additions, 4 deletions
src/js/AstroMap.js
with
14 additions
and
4 deletions
src/js/AstroMap.js
+
14
−
4
View file @
1f1597d0
...
@@ -290,13 +290,12 @@ export default L.Map.AstroMap = L.Map.extend({
...
@@ -290,13 +290,12 @@ export default L.Map.AstroMap = L.Map.extend({
let
sld_style
=
null
;
let
sld_style
=
null
;
let
wrappedFeatures
=
null
;
let
wrappedFeatures
=
null
;
// Add each _geoLayer that has footprints to the FootprintCollection object.
// Add each _geoLayer that has footprints to the FootprintCollection object.
// The collection title is used as the property name
// The collection title is used as the property name
// [old] and it shows up as the layer title when added to the separate Leaflet control
// [old] and it shows up as the layer title when added to the separate Leaflet control
if
(
features_in_curr_collection
>
0
)
{
if
(
features_in_curr_collection
>
0
)
{
sld_style
=
this
.
s
etStyle
(
sld_text
,
this
.
SLDStyler
,
i
);
sld_style
=
this
.
g
etStyle
(
sld_text
,
this
.
SLDStyler
,
i
);
wrappedFeatures
=
this
.
cloneWestEast
(
curr_collection
.
features
);
wrappedFeatures
=
this
.
cloneWestEast
(
curr_collection
.
features
);
this
.
_geoLayers
[
i
]
=
L
.
geoJSON
(
wrappedFeatures
,
{
this
.
_geoLayers
[
i
]
=
L
.
geoJSON
(
wrappedFeatures
,
{
...
@@ -331,7 +330,14 @@ export default L.Map.AstroMap = L.Map.extend({
...
@@ -331,7 +330,14 @@ export default L.Map.AstroMap = L.Map.extend({
}
}
},
},
setStyle
:
function
(
sld_style
,
SLDStyler
,
index
){
/**
* @function AstroMap.prototype.getStyle
* @description gets the style for SLD.styler
* @param {string} sld_style - sld text
* @param {object} SLDStyler - styling tool for geoJSON objects
* @param {int} index - index to get different default styles
*/
getStyle
:
function
(
sld_style
,
SLDStyler
,
index
){
let
colors
=
[
"
#17A398
"
,
"
#EE6C4D
"
,
"
#662C91
"
,
"
#F3DE2C
"
,
"
#33312E
"
,
"
#0267C1
"
];
let
colors
=
[
"
#17A398
"
,
"
#EE6C4D
"
,
"
#662C91
"
,
"
#F3DE2C
"
,
"
#33312E
"
,
"
#0267C1
"
];
let
lightcolors
=
[
"
#3DE3D5
"
,
"
#F49C86
"
,
"
#9958CC
"
,
"
#F7E96F
"
,
"
#DDDDDD
"
,
"
#2A9BFD
"
];
let
lightcolors
=
[
"
#3DE3D5
"
,
"
#F49C86
"
,
"
#9958CC
"
,
"
#F7E96F
"
,
"
#DDDDDD
"
,
"
#2A9BFD
"
];
...
@@ -346,7 +352,11 @@ export default L.Map.AstroMap = L.Map.extend({
...
@@ -346,7 +352,11 @@ export default L.Map.AstroMap = L.Map.extend({
return
defaultStyle
;
return
defaultStyle
;
},
},
// removes layers previously loaded
/**
* @function AstroMap.prototype.removePreviousLayers
* @description removes previous layers off of leaflet map
*
*/
removePreviousLayers
:
function
(
geoLayers
,
L
)
{
removePreviousLayers
:
function
(
geoLayers
,
L
)
{
// removes layers previously loaded
// removes layers previously loaded
let
collection_amount
=
geoLayers
.
length
;
let
collection_amount
=
geoLayers
.
length
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment