Here you can find the source of geoCoderUrlBuilder(double lat, double lng)
Parameter | Description |
---|---|
lat | a parameter |
lng | a parameter |
public static String geoCoderUrlBuilder(double lat, double lng)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w . j av a2 s. c o m*/ * * Builds a url for google api for the given parameters * * @param lat * @param lng * @return url */ public static String geoCoderUrlBuilder(double lat, double lng) { String googleurl = "https://maps.google.com/maps/api/geocode/json?key=AIzaSyACYVxd_d-49UnhqibCI6F9f7b5Gw1qTSc&"; // Log.v("HTTP" , "Latitude is: " + lat + "Longitude is:" + lng); StringBuilder sbuilder = new StringBuilder(); sbuilder.append(googleurl); sbuilder.append("latlng=" + lat + "," + lng); sbuilder.append("&sensor=true"); String url = sbuilder.toString(); return url; } }