Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FloodSimulation-Browser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
FloodSimulation-Browser
Commits
c2aef539
Commit
c2aef539
authored
Apr 23, 2012
by
Richard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Worked on floodsimulation
parent
46aa5b8d
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
119 additions
and
66 deletions
+119
-66
.gitignore
.gitignore
+3
-0
www/app.js
www/app.js
+2
-2
www/app/controller/Main.js
www/app/controller/Main.js
+11
-44
www/app/model/SimulationDetails.js
www/app/model/SimulationDetails.js
+7
-0
www/app/store/ImagesStore.js
www/app/store/ImagesStore.js
+21
-0
www/app/store/SimulationStore.js
www/app/store/SimulationStore.js
+1
-1
www/app/view/List.js
www/app/view/List.js
+1
-0
www/app/view/Main.js
www/app/view/Main.js
+12
-12
www/app/view/Map.js
www/app/view/Map.js
+58
-4
www/build/native/My Application.app/webapp/app.js
www/build/native/My Application.app/webapp/app.js
+1
-1
www/build/package/app.js
www/build/package/app.js
+1
-1
www/packager.temp.json
www/packager.temp.json
+1
-1
No files found.
.gitignore
0 → 100644
View file @
c2aef539
www/sdk/*
www/sencha-touch-2.0.0-commercial/*
www/app.js
View file @
c2aef539
...
@@ -6,8 +6,8 @@ Ext.Loader.setPath({
...
@@ -6,8 +6,8 @@ Ext.Loader.setPath({
Ext
.
application
({
Ext
.
application
({
controllers
:
[
"
Main
"
],
controllers
:
[
"
Main
"
],
models
:
[
"
SimulationModel
"
],
models
:
[
"
SimulationModel
"
,
'
SimulationDetails
'
],
stores
:
[
'
SimulationStore
'
],
stores
:
[
'
SimulationStore
'
,
'
ImagesStore
'
],
name
:
'
app
'
,
name
:
'
app
'
,
...
...
www/app/controller/Main.js
View file @
c2aef539
Ext
.
define
(
'
app.controller.Main
'
,
{
Ext
.
define
(
'
app.controller.Main
'
,
{
extend
:
'
Ext.app.Controller
'
,
extend
:
'
Ext.app.Controller
'
,
config
:
{
config
:
{
refs
:
{
refs
:
{
...
@@ -13,61 +12,29 @@ Ext.define('app.controller.Main', {
...
@@ -13,61 +12,29 @@ Ext.define('app.controller.Main', {
},
},
'
#mapa
'
:
{
'
#mapa
'
:
{
maprender
:
'
overlay
'
maprender
:
'
setMap
'
}
}
}
}
},
},
overlay
:
function
(
extmap
,
map
){
setMap
:
function
(
extmap
,
map
){
console
.
log
(
"
allo
"
);
this
.
globalMap
=
map
;
this
.
globalMap
=
map
;
var
pos
=
new
google
.
maps
.
LatLng
(
52.3700
,
4.89000
);
this
.
getMapView
().
setGlobalMap
(
extmap
,
map
);
console
.
log
(
map
);
var
traffic
=
new
google
.
maps
.
TrafficLayer
();
new
google
.
maps
.
Marker
({
traffic
.
setMap
(
map
);
position
:
pos
,
icon
:
'
Google_Maps_Marker.png
'
,
map
:
map
,
title
:
'
YOO
'
});
},
},
showOverlay
:
function
(
list
,
index
,
element
,
record
)
{
showOverlay
:
function
(
list
,
index
,
element
,
record
)
{
var
store
=
Ext
.
getStore
(
'
ImagesStore
'
);
store
.
setUrl
(
record
.
get
(
'
area_id
'
));
store
.
load
();
var
bounds
=
record
.
get
(
'
visbounds
'
);
var
bounds
=
record
.
get
(
'
visbounds
'
);
var
center
=
record
.
get
(
'
center
'
);
var
center
=
record
.
get
(
'
center
'
);
var
corners
=
record
.
get
(
'
corners
'
);
var
corners
=
record
.
get
(
'
corners
'
);
this
.
getMapView
().
setCenterMap
(
center
);
var
imageBounds
=
new
google
.
maps
.
LatLngBounds
(
this
.
getMapView
().
createOverlayImage
(
bounds
);
new
google
.
maps
.
LatLng
(
bounds
[
2
],
bounds
[
3
]),
this
.
getMapView
().
createOverlayPolygon
(
corners
);
new
google
.
maps
.
LatLng
(
bounds
[
0
],
bounds
[
1
]));
var
cornerBounds
=
[
new
google
.
maps
.
LatLng
(
corners
[
0
][
0
],
corners
[
0
][
1
]),
new
google
.
maps
.
LatLng
(
corners
[
1
][
0
],
corners
[
1
][
1
]),
new
google
.
maps
.
LatLng
(
corners
[
2
][
0
],
corners
[
2
][
1
]),
new
google
.
maps
.
LatLng
(
corners
[
3
][
0
],
corners
[
3
][
1
])
];
new
google
.
maps
.
GroundOverlay
(
'
floodmap1.jpg
'
,
imageBounds
,
{
map
:
this
.
globalMap
});
var
rectangle
=
new
google
.
maps
.
Polygon
({
paths
:
cornerBounds
,
strokeColor
:
"
#FF0000
"
,
strokeOpacity
:
0.8
,
strokeWeight
:
2
,
fillColor
:
"
#FF0000
"
,
fillOpacity
:
0.35
});
rectangle
.
setMap
(
this
.
globalMap
);
this
.
getMap
().
setMapCenter
(
{
latitude
:
center
[
0
],
longitude
:
center
[
1
]}
);
this
.
getMap
().
setMapOptions
({
zoom
:
12
,
});
},
},
});
});
\ No newline at end of file
www/app/model/SimulationDetails.js
0 → 100644
View file @
c2aef539
Ext
.
define
(
'
app.model.SimulationDetails
'
,
{
extend
:
'
Ext.data.Model
'
,
config
:
{
fields
:
[
'
name
'
,
'
center
'
,
'
corners
'
,
'
size
'
,
'
extents
'
,
'
visbounds
'
,
'
vissize
'
,
'
projection
'
,
'
dikes
'
],
},
});
\ No newline at end of file
www/app/store/ImagesStore.js
0 → 100644
View file @
c2aef539
Ext
.
define
(
'
app.store.ImagesStore
'
,
{
extend
:
'
Ext.data.Store
'
,
requires
:
[
'
Ext.data.proxy.Rest
'
],
xtype
:
'
ImagesStore
'
,
config
:
{
model
:
'
app.model.SimulationDetails
'
,
fields
:
[
'
name
'
,
'
corners
'
,
'
visbounds
'
,
'
area_id
'
,
'
center
'
],
proxy
:
{
type
:
'
rest
'
,
url
:
'
http://sangkil.science.uva.nl:8003/area/
'
,
reader
:
{
type
:
'
json
'
,
},
}
},
setUrl
:
function
(
area_id
)
{
var
store
=
Ext
.
getStore
(
'
ImagesStore
'
).
getProxy
();
store
.
_url
=
'
http://sangkil.science.uva.nl:8003/area/
'
+
area_id
+
'
/info.json
'
;
}
});
\ No newline at end of file
www/app/store/SimulationStore.js
View file @
c2aef539
var
simstore
=
Ext
.
define
(
'
app.store.SimulationStore
'
,
{
Ext
.
define
(
'
app.store.SimulationStore
'
,
{
extend
:
'
Ext.data.Store
'
,
extend
:
'
Ext.data.Store
'
,
requires
:
[
'
Ext.data.proxy.Rest
'
],
requires
:
[
'
Ext.data.proxy.Rest
'
],
id
:
'
simulationList
'
,
id
:
'
simulationList
'
,
...
...
www/app/view/List.js
View file @
c2aef539
...
@@ -30,6 +30,7 @@ Ext.define("app.view.List",
...
@@ -30,6 +30,7 @@ Ext.define("app.view.List",
},
},
{
{
xtype
:
'
list
'
,
xtype
:
'
list
'
,
ui
:
'
round
'
,
itemTpl
:
'
<div>{name}</div>
'
,
itemTpl
:
'
<div>{name}</div>
'
,
store
:
'
SimulationStore
'
,
store
:
'
SimulationStore
'
,
flex
:
1
flex
:
1
...
...
www/app/view/Main.js
View file @
c2aef539
...
@@ -7,19 +7,19 @@ Ext.define("app.view.Main", {
...
@@ -7,19 +7,19 @@ Ext.define("app.view.Main", {
layout
:
"
hbox
"
,
layout
:
"
hbox
"
,
fullscreen
:
true
,
fullscreen
:
true
,
layout
:
"
hbox
"
,
layout
:
"
hbox
"
,
items
:
[
items
:
[
{
{
xtype
:
'
listpanel
'
,
xtype
:
'
listpanel
'
,
flex
:
1
flex
:
1
},
},
{
{
xtype
:
'
simulationpanel
'
,
xtype
:
'
simulationpanel
'
,
flex
:
2
flex
:
2
},
},
]
]
}
}
});
});
\ No newline at end of file
www/app/view/Map.js
View file @
c2aef539
...
@@ -5,16 +5,70 @@ Ext.define('app.view.Map', {
...
@@ -5,16 +5,70 @@ Ext.define('app.view.Map', {
config
:
{
config
:
{
mapOptions
:
{
mapOptions
:
{
zoom
:
1
0
,
zoom
:
1
2
,
mapTypeId
:
google
.
maps
.
MapTypeId
.
ROADMAP
,
mapTypeId
:
google
.
maps
.
MapTypeId
.
ROADMAP
,
navigationControl
:
true
,
navigationControl
:
true
,
navigationControlOptions
:
{
navigationControlOptions
:
{
style
:
google
.
maps
.
NavigationControlStyle
.
DEFAULT
style
:
google
.
maps
.
NavigationControlStyle
.
DEFAULT
}
}
}
},
},
setGlobalMap
:
function
(
extmap
,
map
){
this
.
globalMap
=
map
;
this
.
globalExtMap
=
extmap
;
},
setCenterMap
:
function
(
center
){
this
.
globalExtMap
.
setMapCenter
({
latitude
:
center
[
0
],
longitude
:
center
[
1
]});
},
/*
* options - list of options, see doc google api
*/
alterMapOptions
:
function
(
options
){
this
.
globalExtMap
.
setMapOptions
(
options
);
},
createMarker
:
function
(
position
){
var
pos
=
new
google
.
maps
.
LatLng
(
52.3700
,
4.89000
);
new
google
.
maps
.
Marker
({
position
:
pos
,
icon
:
'
Google_Maps_Marker.png
'
,
map
:
this
.
globalMap
,
title
:
'
you
'
});
},
/*create overlay*/
createOverlayImage
:
function
(
bounds
)
{
var
image
=
'
floodmap1.jpg
'
;
var
imageBounds
=
new
google
.
maps
.
LatLngBounds
(
new
google
.
maps
.
LatLng
(
bounds
[
2
],
bounds
[
3
]),
new
google
.
maps
.
LatLng
(
bounds
[
0
],
bounds
[
1
]));
new
google
.
maps
.
GroundOverlay
(
image
,
imageBounds
,
{
map
:
this
.
globalMap
});
},
},
example
:
function
()
{
createOverlayPolygon
:
function
(
corners
){
console
.
log
(
"
example function
"
);
var
cornerBounds
=
[];
for
(
i
in
corners
)
{
console
.
log
(
corners
[
i
][
0
],
corners
[
i
][
1
]);
cornerBounds
.
push
(
new
google
.
maps
.
LatLng
(
corners
[
i
][
0
],
corners
[
i
][
1
]));
}
new
google
.
maps
.
LatLng
(
corners
[
1
][
0
],
corners
[
1
][
1
]),
new
google
.
maps
.
LatLng
(
corners
[
2
][
0
],
corners
[
2
][
1
]),
new
google
.
maps
.
LatLng
(
corners
[
3
][
0
],
corners
[
3
][
1
])
var
rectangle
=
new
google
.
maps
.
Polygon
({
paths
:
cornerBounds
,
strokeColor
:
"
#FF0000
"
,
strokeOpacity
:
0.8
,
strokeWeight
:
2
,
fillColor
:
"
#FF0000
"
,
fillOpacity
:
0.35
});
rectangle
.
setMap
(
this
.
globalMap
);
}
}
});
});
\ No newline at end of file
www/build/native/My Application.app/webapp/app.js
View file @
c2aef539
This diff is collapsed.
Click to expand it.
www/build/package/app.js
View file @
c2aef539
This diff is collapsed.
Click to expand it.
www/packager.temp.json
View file @
c2aef539
{
"applicationName"
:
"My Application"
,
"applicationId"
:
"com.mycompany.myAppID"
,
"versionString"
:
"1.0"
,
"iconName"
:
"resources/icons/Icon~ipad.png"
,
"inputPath"
:
"/Users/Richard/Documents/UvA/floodsimulation/senchapp/www/build/package"
,
"outputPath"
:
"/Users/Richard/Documents/UvA/floodsimulation/senchapp/www/build/native"
,
"configuration"
:
"Debug"
,
"platform"
:
"iOSSimulator"
,
"deviceType"
:
"iPad"
,
"certificatePath"
:
"/path/to/certificate.file"
,
"certificateAlias"
:
""
,
"sdkPath"
:
"/path/to/android-sdk"
,
"androidAPILevel"
:
"15"
,
"orientations"
:[
"portrait"
,
"landscapeLeft"
,
"landscapeRight"
,
"portraitUpsideDown"
]}
{
"applicationName"
:
"My Application"
,
"applicationId"
:
"com.mycompany.myAppID"
,
"versionString"
:
"1.0"
,
"iconName"
:
"resources/icons/Icon~ipad.png"
,
"inputPath"
:
"/Users/Richard/Documents/UvA/floodsimulation/FloodSimulation-Browser/www/build/package"
,
"outputPath"
:
"/Users/Richard/Documents/UvA/floodsimulation/FloodSimulation-Browser/www/build/native"
,
"configuration"
:
"Debug"
,
"platform"
:
"iOSSimulator"
,
"deviceType"
:
"iPad"
,
"certificatePath"
:
"/path/to/certificate.file"
,
"certificateAlias"
:
""
,
"sdkPath"
:
"/path/to/android-sdk"
,
"androidAPILevel"
:
"15"
,
"orientations"
:[
"portrait"
,
"landscapeLeft"
,
"landscapeRight"
,
"portraitUpsideDown"
]}
\ No newline at end of file
\ No newline at end of file
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