Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaflet-oilspill-control
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stw
leaflet-oilspill-control
Commits
9aa33eda
Commit
9aa33eda
authored
Aug 17, 2017
by
Tomas Pettersson
🏸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bbox
parent
f9f43b9b
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
13 deletions
+49
-13
demo/index.html
demo/index.html
+11
-4
dist/leaflet-oilspill-control.js
dist/leaflet-oilspill-control.js
+11
-2
src/leaflet-oilspill-cards.js
src/leaflet-oilspill-cards.js
+2
-1
src/leaflet-oilspill-cards.js.map
src/leaflet-oilspill-cards.js.map
+1
-1
src/leaflet-oilspill-cards.ts
src/leaflet-oilspill-cards.ts
+3
-2
src/leaflet-oilspill-control.js
src/leaflet-oilspill-control.js
+9
-1
src/leaflet-oilspill-control.js.map
src/leaflet-oilspill-control.js.map
+1
-1
src/leaflet-oilspill-control.ts
src/leaflet-oilspill-control.ts
+11
-1
No files found.
demo/index.html
View file @
9aa33eda
...
...
@@ -105,9 +105,9 @@
"
sAreaMultiPolygon
"
:
"
MultiPolygon
"
,
"
tArea
"
:
"
Select outlet type
"
,
"
tLatitude
"
:
"
Latitude
"
,
"
tLatituderange
"
:
"
range
[-90 to 90]
"
,
"
tLatituderange
"
:
"
range
"
,
"
tLongitude
"
:
"
Longitude
"
,
"
tLongituderange
"
:
"
range
[-180 to 180]
"
,
"
tLongituderange
"
:
"
range
"
,
"
rDDM
"
:
"
Degrees Decimal Minutes
"
,
"
rDD
"
:
"
Decimal Degrees
"
,
...
...
@@ -126,10 +126,17 @@
};
// NEMO bbox
var
bbox
=
{};
bbox
[
'
s
'
]
=
48.4917
;
bbox
[
'
n
'
]
=
65.89142
;
bbox
[
'
w
'
]
=
-
4.15278
;
bbox
[
'
e
'
]
=
30.18021
;
var
oilspill
=
new
L
.
Control
.
OilSpill
({
"
lang
"
:
language
,
"
langdata
"
:
langData
"
langdata
"
:
langData
,
"
bbox
"
:
bbox
});
containerControl
.
addComponent
(
"
Continuous Oil spill
"
,
oilspill
);
...
...
dist/leaflet-oilspill-control.js
View file @
9aa33eda
...
...
@@ -72,7 +72,7 @@ var OilSpillCard = (function () {
}());
var
OSLocation
=
(
function
(
_super
)
{
__extends
(
OSLocation
,
_super
);
function
OSLocation
(
id
,
parentDiv
,
lang
,
langData
,
map
)
{
function
OSLocation
(
id
,
parentDiv
,
lang
,
langData
,
map
,
bbox
)
{
var
_this
=
this
;
var
locationDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-width-1-1 uk-margin-top
'
,
parentDiv
);
_this
=
_super
.
call
(
this
,
id
,
'
Specify time and location
'
,
parentDiv
,
locationDiv
)
||
this
;
...
...
@@ -157,6 +157,7 @@ var OSLocation = (function (_super) {
"
langdata
"
:
langData
.
coordinates
,
"
id
"
:
id
,
"
inline
"
:
true
,
"
bbox
"
:
bbox
,
"
table
"
:
true
,
"
type
"
:
false
,
"
buttons
"
:
false
,
...
...
@@ -917,6 +918,14 @@ var L;
if
(
options
.
langdata
)
{
_this
.
langData
=
options
.
langdata
;
}
_this
.
bbox
=
{};
_this
.
bbox
[
'
s
'
]
=
-
90
;
_this
.
bbox
[
'
n
'
]
=
90
;
_this
.
bbox
[
'
w
'
]
=
-
180
;
_this
.
bbox
[
'
e
'
]
=
180
;
if
(
options
.
bbox
)
{
_this
.
bbox
=
options
.
bbox
;
}
return
_this
;
}
OilSpill
.
prototype
.
onAdd
=
function
(
map
)
{
...
...
@@ -1015,7 +1024,7 @@ var L;
this
.
container
=
L
.
DomUtil
.
create
(
'
div
'
,
'
oilspill-control
'
);
var
accordionDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-accordion
'
,
this
.
container
);
var
locationid
=
'
oslocationCard
'
;
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
);
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
,
self
.
bbox
);
self
.
cardMap
[
locationid
].
show
();
var
periodid
=
'
osperiodCard
'
;
self
.
cardMap
[
periodid
]
=
new
OSPeriod
(
periodid
,
accordionDiv
,
self
.
lang
,
self
.
map
);
...
...
src/leaflet-oilspill-cards.js
View file @
9aa33eda
...
...
@@ -72,7 +72,7 @@ var OilSpillCard = (function () {
}());
var
OSLocation
=
(
function
(
_super
)
{
__extends
(
OSLocation
,
_super
);
function
OSLocation
(
id
,
parentDiv
,
lang
,
langData
,
map
)
{
function
OSLocation
(
id
,
parentDiv
,
lang
,
langData
,
map
,
bbox
)
{
var
_this
=
this
;
var
locationDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-width-1-1 uk-margin-top
'
,
parentDiv
);
_this
=
_super
.
call
(
this
,
id
,
'
Specify time and location
'
,
parentDiv
,
locationDiv
)
||
this
;
...
...
@@ -157,6 +157,7 @@ var OSLocation = (function (_super) {
"
langdata
"
:
langData
.
coordinates
,
"
id
"
:
id
,
"
inline
"
:
true
,
"
bbox
"
:
bbox
,
"
table
"
:
true
,
"
type
"
:
false
,
"
buttons
"
:
false
,
...
...
src/leaflet-oilspill-cards.js.map
View file @
9aa33eda
This diff is collapsed.
Click to expand it.
src/leaflet-oilspill-cards.ts
View file @
9aa33eda
...
...
@@ -96,7 +96,7 @@ class OSLocation extends OilSpillCard {
constructor
(
id
,
parentDiv
,
lang
,
langData
,
map
)
{
constructor
(
id
,
parentDiv
,
lang
,
langData
,
map
,
bbox
)
{
var
locationDiv
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-width-1-1 uk-margin-top
'
,
parentDiv
);
super
(
id
,
'
Specify time and location
'
,
parentDiv
,
locationDiv
);
var
self
=
this
;
...
...
@@ -181,7 +181,8 @@ class OSLocation extends OilSpillCard {
"
lang
"
:
lang
,
"
langdata
"
:
langData
.
coordinates
,
"
id
"
:
id
,
"
inline
"
:
true
,
"
inline
"
:
true
,
"
bbox
"
:
bbox
,
"
table
"
:
true
,
"
type
"
:
false
,
"
buttons
"
:
false
,
...
...
src/leaflet-oilspill-control.js
View file @
9aa33eda
...
...
@@ -31,6 +31,14 @@ var L;
if
(
options
.
langdata
)
{
_this
.
langData
=
options
.
langdata
;
}
_this
.
bbox
=
{};
_this
.
bbox
[
'
s
'
]
=
-
90
;
_this
.
bbox
[
'
n
'
]
=
90
;
_this
.
bbox
[
'
w
'
]
=
-
180
;
_this
.
bbox
[
'
e
'
]
=
180
;
if
(
options
.
bbox
)
{
_this
.
bbox
=
options
.
bbox
;
}
return
_this
;
}
OilSpill
.
prototype
.
onAdd
=
function
(
map
)
{
...
...
@@ -129,7 +137,7 @@ var L;
this
.
container
=
L
.
DomUtil
.
create
(
'
div
'
,
'
oilspill-control
'
);
var
accordionDiv
=
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-accordion
'
,
this
.
container
);
var
locationid
=
'
oslocationCard
'
;
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
);
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
,
self
.
bbox
);
self
.
cardMap
[
locationid
].
show
();
var
periodid
=
'
osperiodCard
'
;
self
.
cardMap
[
periodid
]
=
new
OSPeriod
(
periodid
,
accordionDiv
,
self
.
lang
,
self
.
map
);
...
...
src/leaflet-oilspill-control.js.map
View file @
9aa33eda
This diff is collapsed.
Click to expand it.
src/leaflet-oilspill-control.ts
View file @
9aa33eda
...
...
@@ -21,6 +21,7 @@ module L.Control {
private
selectCalculationMode
:
HTMLSelectElement
;
private
uncertaintyInput
:
HTMLInputElement
;
private
startButton
:
HTMLButtonElement
;
private
bbox
:
any
;
constructor
(
options
)
{
super
(
options
);
...
...
@@ -35,6 +36,15 @@ module L.Control {
this
.
langData
=
options
.
langdata
;
}
this
.
bbox
=
{};
this
.
bbox
[
'
s
'
]
=
-
90
;
this
.
bbox
[
'
n
'
]
=
90
;
this
.
bbox
[
'
w
'
]
=
-
180
;
this
.
bbox
[
'
e
'
]
=
180
;
if
(
options
.
bbox
)
{
this
.
bbox
=
options
.
bbox
;
}
}
public
onAdd
(
map
)
{
...
...
@@ -136,7 +146,7 @@ module L.Control {
this
.
container
=
L
.
DomUtil
.
create
(
'
div
'
,
'
oilspill-control
'
);
var
accordionDiv
=
<
HTMLDivElement
>
L
.
DomUtil
.
create
(
'
div
'
,
'
uk-accordion
'
,
this
.
container
);
var
locationid
=
'
oslocationCard
'
;
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
);
self
.
cardMap
[
locationid
]
=
new
OSLocation
(
locationid
,
accordionDiv
,
self
.
lang
,
self
.
langData
,
self
.
map
,
self
.
bbox
);
self
.
cardMap
[
locationid
].
show
();
var
periodid
=
'
osperiodCard
'
;
self
.
cardMap
[
periodid
]
=
new
OSPeriod
(
periodid
,
accordionDiv
,
self
.
lang
,
self
.
map
);
...
...
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