How create MapPolyline in locationUpdated?
Hi, i have this problem. I create app to trening. I would like to create a map that shows the current lines of the traveled path. I try do it in method locationUpdated because my class implement LocationListener. When i run my app on the map nothing happens.
[CODE]public synchronized void updateMap(Location location) {
QualifiedCoordinates qc = location.getQualifiedCoordinates();
......
GeoCoordinate[] geo = new GeoCoordinate[2];
geo[1] = new GeoCoordinate(qc.getLatitude(), qc.getLongitude(), 0);
geo[2] = new GeoCoordinate(lastqc.getLatitude(), lastqc.getLongitude(), 0);
MapPolyline track = mapFactory.createMapPolyline(geo);
trasa.setVisible(true);
map.addMapObject(track);
}
public void locationUpdated(LocationProvider provider, Location location) {
updateMap(location);
....
}[/CODE]
I would like to achieve the same effect as here (last image):
[url]http://www.developer.nokia.com/Community/Wiki/images/1/15/JavaMELocationAPI_FollowUserMIDlet.png?20110629132515[/url]
what i doing wrong?