Commit e831c4ac authored by Richard's avatar Richard

can now play trough images

parent 04b400d7
...@@ -15,7 +15,7 @@ Ext.application({ ...@@ -15,7 +15,7 @@ Ext.application({
'Ext.MessageBox', 'app.CustomProxy' 'Ext.MessageBox', 'app.CustomProxy'
], ],
views: ['Main', "Home", "Simulation", "List", 'Map', 'StepsOverlay'], views: ['Main', "Home", "Simulation", "List", 'Map', 'StepsOverlay', 'OptionsPanel'],
icon: { icon: {
57: 'resources/icons/Icon.png', 57: 'resources/icons/Icon.png',
......
This diff is collapsed.
...@@ -2,6 +2,6 @@ Ext.define('app.model.SimulationModel', { ...@@ -2,6 +2,6 @@ Ext.define('app.model.SimulationModel', {
extend: 'Ext.data.Model', extend: 'Ext.data.Model',
config: { config: {
fields: ['name', 'corners', 'visbounds', 'area_id', 'center'], fields: ['name', 'corners', 'visbounds', 'area_id', 'center', 'size'],
}, },
}); });
\ No newline at end of file
/*list of areas*/
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'],
......
/*second card list-window*/
Ext.define('app.store.SimulationsSummary', { Ext.define('app.store.SimulationsSummary', {
extend: 'Ext.data.Store', extend: 'Ext.data.Store',
requires: ['Ext.data.proxy.Rest'], requires: ['Ext.data.proxy.Rest'],
......
...@@ -7,13 +7,19 @@ Ext.define("app.view.List", ...@@ -7,13 +7,19 @@ Ext.define("app.view.List",
extend: "Ext.navigation.View", extend: "Ext.navigation.View",
xtype: 'listpanel', xtype: 'listpanel',
requires: [ requires: [
'Ext.data.Store', 'Ext.dataview.List', 'Ext.Map' 'Ext.data.Store', 'Ext.dataview.List', 'Ext.Map'
], ],
title: 'Simulations', title: 'Simulations',
config: { config: {
ui: 'lighter_blue',
navigationBar:
{
ui: 'darker_blue',
//html: '<h1>Simulations Panel</h1>',
},
items: [ items: [
{ {
id: 'cities', id: 'cities',
......
...@@ -18,11 +18,11 @@ Ext.define('app.view.Map', { ...@@ -18,11 +18,11 @@ Ext.define('app.view.Map', {
listeners: { listeners: {
maprender: function() maprender: function()
{ {
console.log('maprender');
this.overlayImages = []; this.overlayImages = [];
this.Images = []; this.Images = [];
this.imageIndex = 0; this.imageIndex = 0;
this.imageBounds = null; this.imageBounds = null;
this.play = false;
} }
} }
}, },
...@@ -51,7 +51,6 @@ Ext.define('app.view.Map', { ...@@ -51,7 +51,6 @@ Ext.define('app.view.Map', {
* *
*/ */
createMarker: function(pos){ createMarker: function(pos){
console.log("setmarker");
var pos = new google.maps.LatLng(pos[0], pos[1]); var pos = new google.maps.LatLng(pos[0], pos[1]);
new google.maps.Marker({ new google.maps.Marker({
position: pos, position: pos,
...@@ -61,33 +60,31 @@ Ext.define('app.view.Map', { ...@@ -61,33 +60,31 @@ Ext.define('app.view.Map', {
}); });
}, },
/*create overlay*/
// 'http://sangkil.science.uva.nl:8003/drfsm/199419691/visualization/level/map/600.png' // 'http://sangkil.science.uva.nl:8003/drfsm/199419691/visualization/level/map/600.png'
// 'http://sangkil.science.uva.nl:8003/drfsm/207/visualization/level/map/300.png' ; // 'http://sangkil.science.uva.nl:8003/drfsm/207/visualization/level/map/300.png' ;
/*create overlays with area_id, bounds and timesteps
* Bounds: array(4)
*/
createOverlayImage: function(bounds, area_id, timesteps) { createOverlayImage: function(bounds, area_id, timesteps) {
console.log('createOverlayImages ' + timesteps);
this.imageIndex = 0; this.imageIndex = 0;
this.imageBounds = new google.maps.LatLngBounds( this.imageBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(bounds[2],bounds[3]), new google.maps.LatLng(bounds[2],bounds[3]),
new google.maps.LatLng(bounds[0],bounds[1])); new google.maps.LatLng(bounds[0],bounds[1]));
this.bounds = bounds; this.bounds = bounds;
// delete all other images
if (this.overlayImages.length > 1) if (this.overlayImages.length > 1)
{
this.removeImages(); this.removeImages();
}
//var image = 'http://sangkil.science.uva.nl:8003/lsm/' + area_id +'/visualization/level/map/400.png'; //var image = 'http://sangkil.science.uva.nl:8003/lsm/' + area_id +'/visualization/level/map/400.png';
for (i in timesteps) for (i in timesteps)
{ {
console.log(i);
var image = 'http://sangkil.science.uva.nl:8003/drfsm/' + area_id + '/visualization/level/map/' + timesteps[i] + '.png'; var image = 'http://sangkil.science.uva.nl:8003/drfsm/' + area_id + '/visualization/level/map/' + timesteps[i] + '.png';
this.overlayImages.push(new google.maps.GroundOverlay(image, this.imageBounds)); this.overlayImages.push(new google.maps.GroundOverlay(image, this.imageBounds));
} }
this.overlayImages[0].setMap(this.globalMap); this.overlayImages[0].setMap(this.globalMap);
}, },
/* set next Image*/
nextImage: function() nextImage: function()
{ {
var lastImagesIndex = this.imageIndex; var lastImagesIndex = this.imageIndex;
...@@ -97,10 +94,9 @@ Ext.define('app.view.Map', { ...@@ -97,10 +94,9 @@ Ext.define('app.view.Map', {
this.overlayImages[this.imageIndex].setMap(this.globalMap); this.overlayImages[this.imageIndex].setMap(this.globalMap);
this.overlayImages[this.imageIndex - 1].setMap(null); this.overlayImages[this.imageIndex - 1].setMap(null);
} }
}, },
/*set prev image*/
prevImage: function() prevImage: function()
{ {
this.overlayImages[this.imageIndex].setMap(null); this.overlayImages[this.imageIndex].setMap(null);
...@@ -109,13 +105,11 @@ Ext.define('app.view.Map', { ...@@ -109,13 +105,11 @@ Ext.define('app.view.Map', {
if (this.imageIndex >= 0) if (this.imageIndex >= 0)
{ {
this.overlayImages[this.imageIndex].setMap(this.globalMap); this.overlayImages[this.imageIndex].setMap(this.globalMap);
console.log(this.overlayImages[this.imageIndex]);
} }
}, },
removeImages: function() removeImages: function()
{ {
console.log('removedImages');
for (i in this.overlayImages) for (i in this.overlayImages)
this.overlayImages[i].setMap(null); this.overlayImages[i].setMap(null);
this.imageIndex = 0; this.imageIndex = 0;
...@@ -144,13 +138,11 @@ Ext.define('app.view.Map', { ...@@ -144,13 +138,11 @@ Ext.define('app.view.Map', {
getCurrentImage: function(){ getCurrentImage: function(){
if (this.overlayImages.length > 0) { if (this.overlayImages.length > 0) {
this.overlayImages[this.imageIndex]; this.overlayImages[this.imageIndex];
console.log(this.overlayImages[this.imageIndex]);
return this.overlayImages[this.imageIndex].url; return this.overlayImages[this.imageIndex].url;
} }
}, },
getFloodImage: function(test_id, timestep){ getFloodImage: function(test_id, timestep){
console.log(timestep);
if (timestep) if (timestep)
return 'http://sangkil.science.uva.nl:8003/drfsm/' + test_id + '/visualization/level/map/' + timestep + '.png'; return 'http://sangkil.science.uva.nl:8003/drfsm/' + test_id + '/visualization/level/map/' + timestep + '.png';
else return false; else return false;
......
...@@ -5,6 +5,7 @@ Ext.define('app.view.StepsOverlay', { ...@@ -5,6 +5,7 @@ Ext.define('app.view.StepsOverlay', {
config: { config: {
style: "background: none",
id: 'overlay', id: 'overlay',
showAnimation: { showAnimation: {
type: 'slideIn', type: 'slideIn',
...@@ -16,10 +17,9 @@ Ext.define('app.view.StepsOverlay', { ...@@ -16,10 +17,9 @@ Ext.define('app.view.StepsOverlay', {
direction:'right', direction:'right',
}, },
//draggable: true, //autoDestroy: true,
autoDestroy: true,
hidden: true, hidden: true,
width: 120, width: 200,
height: 100, height: 100,
scroll: false, scroll: false,
items: [ items: [
...@@ -38,7 +38,7 @@ Ext.define('app.view.StepsOverlay', { ...@@ -38,7 +38,7 @@ Ext.define('app.view.StepsOverlay', {
}, },
{ {
top: 10, top: 10,
left: 20, left: 30,
align: 'center', align: 'center',
items : [ items : [
{ {
...@@ -51,7 +51,7 @@ Ext.define('app.view.StepsOverlay', { ...@@ -51,7 +51,7 @@ Ext.define('app.view.StepsOverlay', {
floating: 'right', floating: 'right',
iconMask: true, iconMask: true,
align: 'center', align: 'center',
left: 40
}, },
{ {
top: 50, top: 50,
...@@ -64,7 +64,63 @@ Ext.define('app.view.StepsOverlay', { ...@@ -64,7 +64,63 @@ Ext.define('app.view.StepsOverlay', {
iconCls: 'arrow_down', iconCls: 'arrow_down',
align: 'center', align: 'center',
iconMask: true, iconMask: true,
}] left: 40
},
{
top: 24,
xtype: "button",
id: 'play',
ui: 'blue',
cls: 'overlay-button',
width: 40,
floating: 'left',
iconCls: 'arrow_right',
align: 'center',
iconMask: true,
left: 85,
},
{
top: 24,
hidden: true,
xtype: "button",
id: 'pause',
ui: 'red',
cls: 'overlay-button',
width: 40,
floating: 'left',
iconCls: 'pause',
align: 'center',
iconMask: true,
left: 85,
},
{
top: 24,
xtype: "button",
id: 'play-backw',
ui: 'blue',
cls: 'overlay-button',
width: 40,
floating: 'left',
iconCls: 'arrow_left',
align: 'center',
iconMask: true,
left: 0,
},
{
top: 24,
hidden: true,
xtype: "button",
id: 'pause-backw',
ui: 'red',
cls: 'overlay-button',
width: 40,
floating: 'left',
iconCls: 'pause',
align: 'center',
iconMask: true,
left: 0,
}],
}], }],
listeners: [{ listeners: [{
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>BuildMachineOSBuild</key>
<string>11D50</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string> <string>en</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
...@@ -14,29 +16,45 @@ ...@@ -14,29 +16,45 @@
<string>resources/icons/Icon~ipad.png</string> <string>resources/icons/Icon~ipad.png</string>
</array> </array>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.mycompany.myAppID</string> <string>com.codefabriek.tipspottmp</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>My Application</string> <string>My Application</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleResourceSpecification</key>
<string>ResourceRules.plist</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0</string> <string>1.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleSupportedPlatforms</key> <key>CFBundleSupportedPlatforms</key>
<array> <array>
<string>iPhoneSimulator</string> <string>iPhoneOS</string>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9A334</string>
<key>DTPlatformName</key> <key>DTPlatformName</key>
<string>iphonesimulator</string> <string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>5.0</string>
<key>DTSDKBuild</key>
<string>9A334</string>
<key>DTSDKName</key> <key>DTSDKName</key>
<string>iphonesimulator5.0</string> <string>iphoneos5.0</string>
<key>DTXcode</key>
<string>0420</string>
<key>DTXcodeBuild</key>
<string>4D199</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>MinimumOSVersion</key>
<string>3.0</string>
<key>UIDeviceFamily</key> <key>UIDeviceFamily</key>
<array> <array>
<integer>1</integer><integer>2</integer> <integer>1</integer><integer>2</integer>
......
...@@ -70,12 +70,17 @@ ...@@ -70,12 +70,17 @@
.flood_thumb { .flood_thumb {
margin-right: 20px; position: absolute;
z-index: 100; z-index: 100;
left: 10px; left: 10px;
top: 10px; top: 10px;
border: solid #ababab; border: solid #ababab;
background: white; }
.map_thumb {
position: relative;
left: 0px;
top: 0px;
} }
#overlay { #overlay {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -70,12 +70,19 @@ ...@@ -70,12 +70,19 @@
.flood_thumb { .flood_thumb {
margin-right: 20px; position: relative;
z-index: 100; z-index: 100;
left: 10px; left: 10px;
top: 10px; top: 10px;
width: 300px;
height: 180px;
border: solid #ababab; border: solid #ababab;
background: white; }
.map_thumb {
position: relative;
left: 0px;
top: 0px;
} }
#overlay { #overlay {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -70,12 +70,19 @@ ...@@ -70,12 +70,19 @@
.flood_thumb { .flood_thumb {
margin-right: 20px; position: relative;
z-index: 100; z-index: 100;
left: 10px; left: 10px;
top: 10px; top: 10px;
border: solid #ababab; width: 300px;
background: white; height: 180px;
border: solid #a0a0a0;
}
.map_thumb {
position: relative;
left: 0px;
top: 0px;
} }
#overlay { #overlay {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* @cfg {String} applicationId * @cfg {String} applicationId
* This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal. * This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
*/ */
"applicationId":"com.mycompany.myAppID", "applicationId":"com.codefabriek.tipspottmp",
/** /**
* @cfg {String} versionString * @cfg {String} versionString
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
* - Android * - Android
* - AndroidEmulator * - AndroidEmulator
*/ */
"platform":"iOSSimulator", "platform":"Android",
/** /**
* @cfg {String} deviceType * @cfg {String} deviceType
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
* This is the location of your certificate. * This is the location of your certificate.
* This is required when you are developing for Android or you are developing on Windows. * This is required when you are developing for Android or you are developing on Windows.
*/ */
"certificatePath":"/path/to/certificate.file", "certificatePath":"~/Documents/UvA/floodsimulation/FloodSimulation-Browser/flood-key.keystore",
/** /**
* @cfg {String} certificateAlias * @cfg {String} certificateAlias
......
{"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":"Universal","certificatePath":"/path/to/certificate.file","certificateAlias":"","sdkPath":"~/Documents/android-sdk-macosx","androidAPILevel":"15","orientations":["portrait","landscapeLeft","landscapeRight","portraitUpsideDown"]}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
@import 'sencha-touch/default/all'; @import 'sencha-touch/default/all';
@include pictos-iconmask('close_overlay'); @include pictos-iconmask('close_overlay');
@include pictos-iconmask('play1');
@include pictos-iconmask('pause');
@include sencha-toolbar-ui('darker_blue', #003F69, 'glossy'); @include sencha-toolbar-ui('darker_blue', #003F69, 'glossy');
@include sencha-toolbar-ui('lighter_blue', #386EBA, 'glossy'); @include sencha-toolbar-ui('lighter_blue', #00538F, 'glossy');
@include sencha-button-ui('blue', #003F69, 'glossy'); @include sencha-button-ui('blue', #003F69, 'glossy');
@include sencha-button-ui('red', #C40000, 'glossy'); @include sencha-button-ui('red', #C40000, 'glossy');
// You may remove any of the following modules that you // You may remove any of the following modules that you
// do not use in order to create a smaller css file. // do not use in order to create a smaller css file.
@include sencha-panel; @include sencha-panel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment