We see a map

This commit is contained in:
Axel Uhl committed 2011-07-08 11:15:22 +02:00
1 parent 5c5588ad32
commit c6c51c778a
14 files changed
+72 -21

No files matched your search

+10
View File
@@ -4,5 +4,15 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/gwt-maps.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/C:/data/SAP/sailing/workspace/java/com.sap.sailing.gwt.ui/lib/gwt-maps-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/gwt-visualization.jar">
<attributes>
<attribute name="javadoc_location" value="jar:file:/C:/data/SAP/sailing/workspace/java/com.sap.sailing.gwt.ui/lib/gwt-visualization-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
@@ -17,6 +17,8 @@ Require-Bundle: javax.servlet;bundle-version="2.5.0",
com.mongodb.driver;bundle-version="2.6.2",
com.sap.sailing.declination
Bundle-ClassPath: war/WEB-INF/classes/,
.
.,
lib/gwt-maps.jar,
lib/gwt-visualization.jar
Bundle-Activator: com.sap.sailing.gwt.ui.server.Activator
Bundle-ActivationPolicy: lazy
+3 -1
View File
@@ -2,4 +2,6 @@ source.. = src/
bin.includes = META-INF/,\
.,\
plugin.xml,\
war/
war/,\
lib/gwt-maps.jar,\
lib/gwt-visualization.jar
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,9 @@
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Google Maps API -->
<inherits name='com.google.gwt.maps.GoogleMaps' />
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
@@ -2,8 +2,17 @@ package com.sap.sailing.gwt.ui.client;
import java.util.List;
import com.google.gwt.maps.client.InfoWindowContent;
import com.google.gwt.maps.client.MapWidget;
import com.google.gwt.maps.client.Maps;
import com.google.gwt.maps.client.control.Control;
import com.google.gwt.maps.client.control.LargeMapControl;
import com.google.gwt.maps.client.control.LargeMapControl3D;
import com.google.gwt.maps.client.control.SmallZoomControl3D;
import com.google.gwt.maps.client.geom.LatLng;
import com.google.gwt.maps.client.overlay.Marker;
import com.google.gwt.user.client.ui.FormPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.sap.sailing.gwt.ui.shared.EventDAO;
public class RaceMapPanel extends FormPanel implements EventDisplayer {
@@ -11,13 +20,40 @@ public class RaceMapPanel extends FormPanel implements EventDisplayer {
private final SailingServiceAsync sailingService;
private final ErrorReporter errorReporter;
private final EventRefresher eventRefresher;
private final VerticalPanel verticalPanel;
private MapWidget map;
private final String mapsAPIKey = "ABQIAAAAmvjPh3ZpHbnwuX3a66lDqRTB4YHzt9A9TZNGGB87gEPRa24TnRQjCq1hRMRvlUmR4K97fo_4LwER6A";
public RaceMapPanel(SailingServiceAsync sailingService, ErrorReporter errorReporter, EventRefresher eventRefresher, StringConstants stringConstants) {
this.sailingService = sailingService;
this.stringConstants = stringConstants;
this.errorReporter = errorReporter;
this.eventRefresher = eventRefresher;
setWidget(new Label("This is the RaceMapPanel"));
this.verticalPanel = new VerticalPanel();
setWidget(verticalPanel);
verticalPanel.setSize("100%", "100%");
Maps.loadMapsApi(mapsAPIKey, "2", false, new Runnable() {
public void run() {
LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);
map = new MapWidget(cawkerCity, 2);
Control newZoomControl = new LargeMapControl3D();
map.addControl(newZoomControl);
// Add a marker
map.addOverlay(new Marker(cawkerCity));
// Add an info window to highlight a point of interest
map.getInfoWindow().open(map.getCenter(),
new InfoWindowContent("World's Largest Ball of Sisal Twine"));
// Add the map to the HTML host page
verticalPanel.add(map);
map.setSize("75%", "768px");
map.setScrollWheelZoomEnabled(true);
map.setContinuousZoom(true);
}
});
}
@Override
@@ -165,7 +165,7 @@ public class WindPanel extends FormPanel implements EventDisplayer, RaceSelectio
grid.setWidget(1, 0, windDisplay);
for (Map.Entry<String, WindTrackInfoDAO> e : result.windTrackInfoByWindSourceName.entrySet()) {
Label windSourceLabel = new Label(stringConstants.windSource()+": "+e.getKey()+
", "+stringConstants.dampeningInterval()+e.getValue().dampeningIntervalInMilliseconds+"ms");
", "+stringConstants.dampeningInterval()+" "+e.getValue().dampeningIntervalInMilliseconds+"ms");
windDisplay.add(windSourceLabel);
timeColumn.setSortable(true);
speedInKnotsColumn.setSortable(true);
@@ -1,3 +1,2 @@
# Module com.sap.sailing.gwt.ui.AdminConsole
# RPC service class, partial path of RPC policy file
com.sap.sailing.gwt.ui.client.SailingService, 2A6212C6C4CDCC2CD37D84C2FC4058B4.gwt.rpc
@@ -1,17 +1,16 @@
function com_sap_sailing_gwt_ui_AdminConsole(){var O='',vb='" for "gwt:onLoadErrorFn"',tb='" for "gwt:onPropertyErrorFn"',hb='"><\/script>',Y='#',Vb='.cache.html',$='/',Ob='12C9241BFFB9D2FB2967869B47498E66',Pb='2362B08270350933735C56CA892812ED',Qb='6A7E6557A562AA8CA76DCF5F22D49F2B',Rb='7F3CF775063EE5019A93EF3FF3BDFE8A',Sb='84614B59C81EDC4212DA020D00E4CB53',Tb='898C56B191F10C08A08FFA7C080EDEB1',Ub=':',nb='::',bc='<script defer="defer">com_sap_sailing_gwt_ui_AdminConsole.onInjectionDone(\'com.sap.sailing.gwt.ui.AdminConsole\')<\/script>',gb='<script id="',qb='=',Z='?',sb='Bad handler "',ac='DOMContentLoaded',ib='SCRIPT',fb='__gwt_marker_com.sap.sailing.gwt.ui.AdminConsole',jb='base',bb='baseUrl',S='begin',R='bootstrap',ab='clear.cache.gif',P='com.sap.sailing.gwt.ui.AdminConsole',db='com.sap.sailing.gwt.ui.AdminConsole.nocache.js',mb='com.sap.sailing.gwt.ui.AdminConsole::',pb='content',X='end',Ib='gecko',Jb='gecko1_8',T='gwt.codesvr=',U='gwt.hosted=',V='gwt.hybrid',Wb='gwt/clean/clean.css',ub='gwt:onLoadErrorFn',rb='gwt:onPropertyErrorFn',ob='gwt:property',_b='head',Mb='hosted.html?com_sap_sailing_gwt_ui_AdminConsole',$b='href',Hb='ie6',Gb='ie8',Fb='ie9',wb='iframe',_='img',xb="javascript:''",Xb='link',Lb='loadExternalRefs',kb='meta',zb='moduleRequested',W='moduleStartup',Eb='msie',lb='name',Bb='opera',yb='position:absolute;width:0;height:0;border:none',Yb='rel',Db='safari',cb='script',Nb='selectingPermutation',Q='startup',Zb='stylesheet',eb='undefined',Kb='unknown',Ab='user.agent',Cb='webkit';var l=window,m=document,n=l.__gwtStatsEvent?function(a){return l.__gwtStatsEvent(a)}:null,o=l.__gwtStatsSessionId?l.__gwtStatsSessionId:null,p,q,r,s=O,t={},u=[],v=[],w=[],x=0,y,z;n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:R,millis:(new Date).getTime(),type:S});if(!l.__gwt_stylesLoaded){l.__gwt_stylesLoaded={}}if(!l.__gwt_scriptsLoaded){l.__gwt_scriptsLoaded={}}function A(){var b=false;try{var c=l.location.search;return (c.indexOf(T)!=-1||(c.indexOf(U)!=-1||l.external&&l.external.gwtOnLoad))&&c.indexOf(V)==-1}catch(a){}A=function(){return b};return b}
function B(){if(p&&q){var b=m.getElementById(P);var c=b.contentWindow;if(A()){c.__gwt_getProperty=function(a){return G(a)}}com_sap_sailing_gwt_ui_AdminConsole=null;c.gwtOnLoad(y,P,s,x);n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:W,millis:(new Date).getTime(),type:X})}}
function C(){function e(a){var b=a.lastIndexOf(Y);if(b==-1){b=a.length}var c=a.indexOf(Z);if(c==-1){c=a.length}var d=a.lastIndexOf($,Math.min(c,b));return d>=0?a.substring(0,d+1):O}
function f(a){if(a.match(/^\w+:\/\//)){}else{var b=m.createElement(_);b.src=a+ab;a=e(b.src)}return a}
function g(){var a=E(bb);if(a!=null){return a}return O}
function h(){var a=m.getElementsByTagName(cb);for(var b=0;b<a.length;++b){if(a[b].src.indexOf(db)!=-1){return e(a[b].src)}}return O}
function i(){var a;if(typeof isBodyLoaded==eb||!isBodyLoaded()){var b=fb;var c;m.write(gb+b+hb);c=m.getElementById(b);a=c&&c.previousSibling;while(a&&a.tagName!=ib){a=a.previousSibling}if(c){c.parentNode.removeChild(c)}if(a&&a.src){return e(a.src)}}return O}
function j(){var a=m.getElementsByTagName(jb);if(a.length>0){return a[a.length-1].href}return O}
var k=g();if(k==O){k=h()}if(k==O){k=i()}if(k==O){k=j()}if(k==O){k=e(m.location.href)}k=f(k);s=k;return k}
function D(){var b=document.getElementsByTagName(kb);for(var c=0,d=b.length;c<d;++c){var e=b[c],f=e.getAttribute(lb),g;if(f){f=f.replace(mb,O);if(f.indexOf(nb)>=0){continue}if(f==ob){g=e.getAttribute(pb);if(g){var h,i=g.indexOf(qb);if(i>=0){f=g.substring(0,i);h=g.substring(i+1)}else{f=g;h=O}t[f]=h}}else if(f==rb){g=e.getAttribute(pb);if(g){try{z=eval(g)}catch(a){alert(sb+g+tb)}}}else if(f==ub){g=e.getAttribute(pb);if(g){try{y=eval(g)}catch(a){alert(sb+g+vb)}}}}}}
function com_sap_sailing_gwt_ui_AdminConsole(){var N='',ub='" for "gwt:onLoadErrorFn"',sb='" for "gwt:onPropertyErrorFn"',gb='"><\/script>',X='#',Pb='.cache.html',Z='/',Ob=':',mb='::',Xb='<script defer="defer">com_sap_sailing_gwt_ui_AdminConsole.onInjectionDone(\'com.sap.sailing.gwt.ui.AdminConsole\')<\/script>',fb='<script id="',pb='=',Y='?',rb='Bad handler "',Wb='DOMContentLoaded',Nb="GWT module 'com.sap.sailing.gwt.ui.AdminConsole' may need to be (re)compiled",hb='SCRIPT',eb='__gwt_marker_com.sap.sailing.gwt.ui.AdminConsole',ib='base',ab='baseUrl',R='begin',Q='bootstrap',_='clear.cache.gif',O='com.sap.sailing.gwt.ui.AdminConsole',cb='com.sap.sailing.gwt.ui.AdminConsole.nocache.js',lb='com.sap.sailing.gwt.ui.AdminConsole::',ob='content',W='end',Hb='gecko',Ib='gecko1_8',S='gwt.codesvr=',T='gwt.hosted=',U='gwt.hybrid',Qb='gwt/clean/clean.css',tb='gwt:onLoadErrorFn',qb='gwt:onPropertyErrorFn',nb='gwt:property',Vb='head',Lb='hosted.html?com_sap_sailing_gwt_ui_AdminConsole',Ub='href',Gb='ie6',Fb='ie8',Eb='ie9',vb='iframe',$='img',wb="javascript:''",Rb='link',Kb='loadExternalRefs',jb='meta',yb='moduleRequested',V='moduleStartup',Db='msie',kb='name',Ab='opera',xb='position:absolute;width:0;height:0;border:none',Sb='rel',Cb='safari',bb='script',Mb='selectingPermutation',P='startup',Tb='stylesheet',db='undefined',Jb='unknown',zb='user.agent',Bb='webkit';var l=window,m=document,n=l.__gwtStatsEvent?function(a){return l.__gwtStatsEvent(a)}:null,o=l.__gwtStatsSessionId?l.__gwtStatsSessionId:null,p,q,r,s=N,t={},u=[],v=[],w=[],x=0,y,z;n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:Q,millis:(new Date).getTime(),type:R});if(!l.__gwt_stylesLoaded){l.__gwt_stylesLoaded={}}if(!l.__gwt_scriptsLoaded){l.__gwt_scriptsLoaded={}}function A(){var b=false;try{var c=l.location.search;return (c.indexOf(S)!=-1||(c.indexOf(T)!=-1||l.external&&l.external.gwtOnLoad))&&c.indexOf(U)==-1}catch(a){}A=function(){return b};return b}
function B(){if(p&&q){var b=m.getElementById(O);var c=b.contentWindow;if(A()){c.__gwt_getProperty=function(a){return F(a)}}com_sap_sailing_gwt_ui_AdminConsole=null;c.gwtOnLoad(y,O,s,x);n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:V,millis:(new Date).getTime(),type:W})}}
function C(){function e(a){var b=a.lastIndexOf(X);if(b==-1){b=a.length}var c=a.indexOf(Y);if(c==-1){c=a.length}var d=a.lastIndexOf(Z,Math.min(c,b));return d>=0?a.substring(0,d+1):N}
function f(a){if(a.match(/^\w+:\/\//)){}else{var b=m.createElement($);b.src=a+_;a=e(b.src)}return a}
function g(){var a=E(ab);if(a!=null){return a}return N}
function h(){var a=m.getElementsByTagName(bb);for(var b=0;b<a.length;++b){if(a[b].src.indexOf(cb)!=-1){return e(a[b].src)}}return N}
function i(){var a;if(typeof isBodyLoaded==db||!isBodyLoaded()){var b=eb;var c;m.write(fb+b+gb);c=m.getElementById(b);a=c&&c.previousSibling;while(a&&a.tagName!=hb){a=a.previousSibling}if(c){c.parentNode.removeChild(c)}if(a&&a.src){return e(a.src)}}return N}
function j(){var a=m.getElementsByTagName(ib);if(a.length>0){return a[a.length-1].href}return N}
var k=g();if(k==N){k=h()}if(k==N){k=i()}if(k==N){k=j()}if(k==N){k=e(m.location.href)}k=f(k);s=k;return k}
function D(){var b=document.getElementsByTagName(jb);for(var c=0,d=b.length;c<d;++c){var e=b[c],f=e.getAttribute(kb),g;if(f){f=f.replace(lb,N);if(f.indexOf(mb)>=0){continue}if(f==nb){g=e.getAttribute(ob);if(g){var h,i=g.indexOf(pb);if(i>=0){f=g.substring(0,i);h=g.substring(i+1)}else{f=g;h=N}t[f]=h}}else if(f==qb){g=e.getAttribute(ob);if(g){try{z=eval(g)}catch(a){alert(rb+g+sb)}}}else if(f==tb){g=e.getAttribute(ob);if(g){try{y=eval(g)}catch(a){alert(rb+g+ub)}}}}}}
function E(a){var b=t[a];return b==null?null:b}
function F(a,b){var c=w;for(var d=0,e=a.length-1;d<e;++d){c=c[a[d]]||(c[a[d]]=[])}c[a[e]]=b}
function G(a){var b=v[a](),c=u[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(z){z(a,d,b)}throw null}
var H;function I(){if(!H){H=true;var a=m.createElement(wb);a.src=xb;a.id=P;a.style.cssText=yb;a.tabIndex=-1;m.body.appendChild(a);n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:W,millis:(new Date).getTime(),type:zb});a.contentWindow.location.replace(s+K)}}
v[Ab]=function(){var b=navigator.userAgent.toLowerCase();var c=function(a){return parseInt(a[1])*1000+parseInt(a[2])};if(function(){return b.indexOf(Bb)!=-1}())return Bb;if(function(){return b.indexOf(Cb)!=-1}())return Db;if(function(){return b.indexOf(Eb)!=-1&&m.documentMode>=9}())return Fb;if(function(){return b.indexOf(Eb)!=-1&&m.documentMode>=8}())return Gb;if(function(){var a=/msie ([0-9]+)\.([0-9]+)/.exec(b);if(a&&a.length==3)return c(a)>=6000}())return Hb;if(function(){return b.indexOf(Ib)!=-1}())return Jb;return Kb};u[Ab]={gecko1_8:0,ie6:1,ie8:2,ie9:3,opera:4,safari:5};com_sap_sailing_gwt_ui_AdminConsole.onScriptLoad=function(){if(H){q=true;B()}};com_sap_sailing_gwt_ui_AdminConsole.onInjectionDone=function(){p=true;n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:Lb,millis:(new Date).getTime(),type:X});B()};D();C();var J;var K;if(A()){if(l.external&&(l.external.initModule&&l.external.initModule(P))){l.location.reload();return}K=Mb;J=O}n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:R,millis:(new Date).getTime(),type:Nb});if(!A()){try{F([Bb],Ob);F([Hb],Pb);F([Jb],Qb);F([Db],Rb);F([Gb],Sb);F([Fb],Tb);J=w[G(Ab)];var L=J.indexOf(Ub);if(L!=-1){x=Number(J.substring(L+1));J=J.substring(0,L)}K=J+Vb}catch(a){return}}var M;function N(){if(!r){r=true;if(!__gwt_stylesLoaded[Wb]){var a=m.createElement(Xb);__gwt_stylesLoaded[Wb]=a;a.setAttribute(Yb,Zb);a.setAttribute($b,s+Wb);m.getElementsByTagName(_b)[0].appendChild(a)}B();if(m.removeEventListener){m.removeEventListener(ac,N,false)}if(M){clearInterval(M)}}}
if(m.addEventListener){m.addEventListener(ac,function(){I();N()},false)}var M=setInterval(function(){if(/loaded|complete/.test(m.readyState)){I();N()}},50);n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:R,millis:(new Date).getTime(),type:X});n&&n({moduleName:P,sessionId:o,subSystem:Q,evtGroup:Lb,millis:(new Date).getTime(),type:S});m.write(bc)}
function F(a){var b=v[a](),c=u[a];if(b in c){return b}var d=[];for(var e in c){d[c[e]]=e}if(z){z(a,d,b)}throw null}
var G;function H(){if(!G){G=true;var a=m.createElement(vb);a.src=wb;a.id=O;a.style.cssText=xb;a.tabIndex=-1;m.body.appendChild(a);n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:V,millis:(new Date).getTime(),type:yb});a.contentWindow.location.replace(s+J)}}
v[zb]=function(){var b=navigator.userAgent.toLowerCase();var c=function(a){return parseInt(a[1])*1000+parseInt(a[2])};if(function(){return b.indexOf(Ab)!=-1}())return Ab;if(function(){return b.indexOf(Bb)!=-1}())return Cb;if(function(){return b.indexOf(Db)!=-1&&m.documentMode>=9}())return Eb;if(function(){return b.indexOf(Db)!=-1&&m.documentMode>=8}())return Fb;if(function(){var a=/msie ([0-9]+)\.([0-9]+)/.exec(b);if(a&&a.length==3)return c(a)>=6000}())return Gb;if(function(){return b.indexOf(Hb)!=-1}())return Ib;return Jb};u[zb]={gecko1_8:0,ie6:1,ie8:2,ie9:3,opera:4,safari:5};com_sap_sailing_gwt_ui_AdminConsole.onScriptLoad=function(){if(G){q=true;B()}};com_sap_sailing_gwt_ui_AdminConsole.onInjectionDone=function(){p=true;n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:Kb,millis:(new Date).getTime(),type:W});B()};D();C();var I;var J;if(A()){if(l.external&&(l.external.initModule&&l.external.initModule(O))){l.location.reload();return}J=Lb;I=N}n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:Q,millis:(new Date).getTime(),type:Mb});if(!A()){try{alert(Nb);return;var K=I.indexOf(Ob);if(K!=-1){x=Number(I.substring(K+1));I=I.substring(0,K)}J=I+Pb}catch(a){return}}var L;function M(){if(!r){r=true;if(!__gwt_stylesLoaded[Qb]){var a=m.createElement(Rb);__gwt_stylesLoaded[Qb]=a;a.setAttribute(Sb,Tb);a.setAttribute(Ub,s+Qb);m.getElementsByTagName(Vb)[0].appendChild(a)}B();if(m.removeEventListener){m.removeEventListener(Wb,M,false)}if(L){clearInterval(L)}}}
if(m.addEventListener){m.addEventListener(Wb,function(){H();M()},false)}var L=setInterval(function(){if(/loaded|complete/.test(m.readyState)){H();M()}},50);n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:Q,millis:(new Date).getTime(),type:W});n&&n({moduleName:O,sessionId:o,subSystem:P,evtGroup:Kb,millis:(new Date).getTime(),type:R});m.write(Xb)}
com_sap_sailing_gwt_ui_AdminConsole();