android String LatLng (75.7403, 72.44697) translate location. it comes as a drain, it is given to me to get lat and lng in double

    2 answers 2

    Are you talking about this?

    LatLng loc = new LatLng(location.getLatitude(), location.getLongitude()); Location location = new Location("my location"); location.setLatitude(loc.latitude); location.setLongitude(loc.longitude); 

      String replace = data.replace ("LatLng (", "") .replace (",", ","). Replace (")", "");

        String[] strArray = new String[0]; strArray = replace.split(","); Double.valueOf(strArray[0]) Double.valueOf(strArray[1])