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 .



Thanx :)

2 comments:

  1. 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.

    ReplyDelete
  2. 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();
    }
    }
    }

    ReplyDelete