Android examples for Map:Location String
to Location String
//package com.java2s; import android.location.Location; public class Main { public static String toLocationString(double latitude, double longitude) { return Location.convert(latitude, Location.FORMAT_DEGREES) + "," + Location.convert(longitude, Location.FORMAT_DEGREES); }// w ww. java2 s . co m public static String toLocationString(Location location) { return Location.convert(location.getLatitude(), Location.FORMAT_DEGREES) + "," + Location.convert(location.getLongitude(), Location.FORMAT_DEGREES); } }