Sms Gratis Indosat

Phone Numbers
0 -
Example : 83832867987 Without 0

Type your Messages

Question: + =

Get bearing between two location using android.location.Location

android.location.Location provide bearingTo(Location dest) method the approximate initial bearing in degrees East of true North when traveling along the shortest path between this location and the given location. The shortest path is defined using the WGS84 ellipsoid. Locations that are (nearly) antipodal may produce meaningless results.

Example:
      //Get the current location
Location startingLocation = new Location("starting point");
startingLocation.setLatitude(myMap.getCameraPosition().target.latitude);
startingLocation.setLongitude(myMap.getCameraPosition().target.longitude);

//Get the target location
Location endingLocation = new Location("ending point");
endingLocation.setLatitude(<target>.latitude);
endingLocation.setLongitude(<target>.longitude);

//Find the Bearing from current location to next location
float targetBearing = startingLocation.bearingTo(endingLocation);


Alfa Romeo 2000 GTV Coupe

S4 / 1.962 cc / 132 PS / 134 ft/lb (183 Nm) @ 3.000 / 0 - 62 mph (100 km/h): 8,9 s / Vmax: 121 mph (195 km/h)

(click images for a larger view)















 
Copyright © 2015. About - Web Version - Mobile Version Sitemap - Contact - Privacy