convert String To Latitude Long - Android Map

Android examples for Map:Latitude Longitude

Description

convert String To Latitude Long

Demo Code


//package com.java2s;

import android.location.Location;

public class Main {
    public static double[] convertStringToLatLong(String str) {
        String[] strArray = str.split(",");
        double[] coordinates = new double[2];
        coordinates[0] = Location.convert(strArray[0]);
        coordinates[1] = Location.convert(strArray[1]);
        return coordinates;
    }//  w  ww  . java  2s .com
}

Related Tutorials