Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
stw
stwkit
Commits
d12bc4e5
Commit
d12bc4e5
authored
Jan 24, 2018
by
Tomas Pettersson
🏸
Browse files
added guide pos
parent
e3407ee0
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
demo/index.html
View file @
d12bc4e5
...
...
@@ -140,6 +140,13 @@
"
domain
"
:
"
HELCOM
"
};
var
guide
=
{
"
position
"
:[
58.35725
,
11.41891
]
};
var
domainname
=
"
HELCOM
"
;
reqwest
({
...
...
@@ -149,6 +156,7 @@
success
:
function
(
forcing
)
{
var
properties
=
{
"
domain
"
:
domainname
,
"
guide
"
:
guide
,
"
lang
"
:
language
,
"
langdata
"
:
langData
,
"
forcingmodel
"
:
forcingconfig
.
model
,
...
...
@@ -177,6 +185,7 @@
// locationoptions['polygon']['name'] = 'Area';
locationoptions
[
'
circle
'
]
=
false
;
locationoptions
[
'
domain
'
]
=
domainname
;
locationoptions
[
'
guide
'
]
=
guide
;
locationoptions
[
'
type
'
]
=
type
;
locationoptions
[
'
subtype
'
]
=
subtype
;
// locationoptions['outlettype'] = false;
...
...
@@ -186,6 +195,7 @@
this
.
cardMap
[
locationid
].
show
();
var
periodoptions
=
{};
periodoptions
[
'
domain
'
]
=
domainname
;
periodoptions
[
'
guide
'
]
=
guide
;
periodoptions
[
'
type
'
]
=
type
;
periodoptions
[
'
subtype
'
]
=
subtype
;
periodoptions
[
'
initials
'
]
=
initials
;
...
...
@@ -194,6 +204,7 @@
this
.
cardMap
[
periodid
]
=
new
STWkit
.
PeriodCard
(
periodid
,
'
Simulation period
'
,
this
.
accordionDiv
,
this
.
lang
,
map
,
this
.
domain
,
this
.
forcingmodel
,
periodoptions
);
var
oiltypeoptions
=
{};
oiltypeoptions
[
'
domain
'
]
=
domainname
;
oiltypeoptions
[
'
guide
'
]
=
guide
;
oiltypeoptions
[
'
type
'
]
=
type
;
oiltypeoptions
[
'
subtype
'
]
=
subtype
;
oiltypeoptions
[
'
initials
'
]
=
initials
;
...
...
src/components/cards.js
View file @
d12bc4e5
...
...
@@ -122,6 +122,7 @@ var STWkit;
var
subtype
=
(
options
&&
options
.
hasOwnProperty
(
'
subtype
'
))
?
options
.
subtype
:
''
;
var
initials
=
(
options
&&
options
.
hasOwnProperty
(
'
initials
'
))
?
options
.
initials
:
''
;
var
domain
=
(
options
&&
options
.
hasOwnProperty
(
'
domain
'
))
?
options
.
domain
:
''
;
var
guide
=
(
options
&&
options
.
hasOwnProperty
(
'
guide
'
))
?
options
.
guide
:
''
;
var
showsingle
=
(
options
&&
options
.
hasOwnProperty
(
'
single
'
))
?
options
.
single
:
true
;
var
showmultiple
=
(
options
&&
options
.
hasOwnProperty
(
'
multiple
'
))
?
options
.
multiple
:
false
;
var
showpolygon
=
(
options
&&
options
.
hasOwnProperty
(
'
polygon
'
)
&&
options
.
polygon
.
hasOwnProperty
(
'
show
'
))
?
options
.
polygon
.
show
:
true
;
...
...
@@ -194,6 +195,12 @@ var STWkit;
feature
[
'
geometry
'
]
=
{};
feature
[
'
geometry
'
][
'
type
'
]
=
"
Point
"
;
feature
[
'
geometry
'
][
'
coordinates
'
]
=
[];
var
lat
=
56.0
;
var
lng
=
19.0
;
if
(
guide
)
{
lat
=
guide
[
0
];
lng
=
guide
[
1
];
}
feature
[
'
geometry
'
][
'
coordinates
'
].
push
(
19.0
);
feature
[
'
geometry
'
][
'
coordinates
'
].
push
(
56.0
);
geojson
[
"
features
"
].
push
(
feature
);
...
...
src/components/cards.js.map
View file @
d12bc4e5
This diff is collapsed.
Click to expand it.
src/components/cards.ts
View file @
d12bc4e5
...
...
@@ -148,6 +148,7 @@ module STWkit {
var
subtype
=
(
options
&&
options
.
hasOwnProperty
(
'
subtype
'
))?
options
.
subtype
:
''
;
var
initials
=
(
options
&&
options
.
hasOwnProperty
(
'
initials
'
))?
options
.
initials
:
''
;
var
domain
=
(
options
&&
options
.
hasOwnProperty
(
'
domain
'
))?
options
.
domain
:
''
;
var
guide
=
(
options
&&
options
.
hasOwnProperty
(
'
guide
'
))?
options
.
guide
:
''
;
var
showsingle
=
(
options
&&
options
.
hasOwnProperty
(
'
single
'
))?
options
.
single
:
true
;
var
showmultiple
=
(
options
&&
options
.
hasOwnProperty
(
'
multiple
'
))?
options
.
multiple
:
false
;
var
showpolygon
=
(
options
&&
options
.
hasOwnProperty
(
'
polygon
'
)
&&
options
.
polygon
.
hasOwnProperty
(
'
show
'
))?
options
.
polygon
.
show
:
true
;
...
...
@@ -220,6 +221,12 @@ module STWkit {
feature
[
'
geometry
'
]
=
{};
feature
[
'
geometry
'
][
'
type
'
]
=
"
Point
"
;
feature
[
'
geometry
'
][
'
coordinates
'
]
=
[];
var
lat
=
56.0
;
var
lng
=
19.0
;
if
(
guide
)
{
lat
=
guide
[
0
];
lng
=
guide
[
1
];
}
feature
[
'
geometry
'
][
'
coordinates
'
].
push
(
19.0
);
feature
[
'
geometry
'
][
'
coordinates
'
].
push
(
56.0
);
geojson
[
"
features
"
].
push
(
feature
);
...
...
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