Hi all,
I'm developing a tracking application with gwt. I've a MapWidget where
the actual positions of some objects are showed, refreshed by calling
an rpc service. When I switch from a tab to the one containing the
map, sometimes the map is not correctly renderered, until the refresh
method is called again. the code doing refreshing is the following:
map.checkResizeAndCenter();
Timer t = new Timer(){
public void run()
{
MainEntryPoint.getServiceWsNaviInMare
().getInfoNaviInMare(new AsyncCallback() {
public void onFailure(Throwable caught) {
throw new UnsupportedOperationException
("Not supported yet.");
}
public void onSuccess(Object result) {
//090209Miki: assegno risultato a lista
Vector listaNavi = (Vector)result;
GWT.log("Lista Navi Ricevuta:
"+listaNavi.toString(), null);
if(listaNavi.size()>0)
{
Iterator i = listaNavi.iterator();
map.clearOverlays();
while(i.hasNext())
{
Nave unaNave = (Nave)i.next();
UTMRef mp = new UTMRef(33, 'N',
(double) (unaNave.getPosizioneX()),
(double) (unaNave.getPosizioneY()));
tsf.ccn.client.uk.me.jstott.jcoord.LatLng ll = mp.toLatLng();
GWT.log("Latitudine: "+ll.getLatitude
(), null);
GWT.log("Longitudine "+ ll.getLongitude
(),null);
LatLng point = LatLng.newInstance
(ll.getLatitude(), ll.getLongitude());
map.addOverlay(createMarker(point,
unaNave));
}
}
map.checkResizeAndCenter();
}
});
}
};
t.scheduleRepeating(MainEntryPoint.refreshShipPeriod);
the object containing the map and added as a tab, is implemented as a
Composite..
where am i wrong?
thx for helping, have a nice day,
Michela
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---