Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Tuesday, February 21, 2012
Write long and lat of gps using java
i want to read stream of GPS and display latitude and longitude with java.I want if is possible a sentance or class that do this .
RouteConverter is an application for dealing with GPS data in many different formats. There is a version without all the GUI stuff that can be used as an API.
you can create a class that implements LocationListener and override onLocationChanged method.
It should be something similar to this.
public class abc implements LocationListener { @override
public void onLocationChanged(Location location){ if (location != null) { // This needs to stop getting the location data and save the battery power. locManager.removeUpdates(locListener); String longitude = "Longitude: " + location.getLongitude(); String latitude = "Latitude: " + location.getLatitude(); } } }
RouteConverter is an application for dealing with GPS data in many different formats. There is a version without all the GUI stuff that can be used as an API.
ReplyDeleteyou can create a class that implements LocationListener and override onLocationChanged method.
ReplyDeleteIt should be something similar to this.
public class abc implements LocationListener {
@override
public void onLocationChanged(Location location){
if (location != null) {
// This needs to stop getting the location data and save the battery power.
locManager.removeUpdates(locListener);
String longitude = "Longitude: " + location.getLongitude();
String latitude = "Latitude: " + location.getLatitude();
}
}
}