location Uri - Android Map

Android examples for Map:Location

Description

location Uri

Demo Code


//package com.java2s;
import android.location.Location;
import java.util.Locale;

public class Main {
    public static String locationUri(Location location, int zoom) {
        return String.format(Locale.ENGLISH, "geo:%f,%f?z=%d",
                location.getLatitude(), location.getLongitude(), zoom);
    }/*from   w  w  w  . j  a v  a 2s.c  o  m*/

    public static String locationUri(Location location, int zoom,
            String label) {
        return String.format(Locale.ENGLISH, "geo:%f,%f?z=%d (%s)",
                location.getLatitude(), location.getLongitude(), zoom,
                label);
    }
}

Related Tutorials