All About Android-Google Place APIs-ANDROIDKAWE

All About Android-Google Place APIs-ANDROIDKAWE - Welcome to ANDROID KAWE, Ini adalah sebuah blog directory tentang burung,baik itu suara burung ataupun tips perawatan burung.Blog ini adalah situs perangkum otomatis dari pencarian google yang kali ini berjudul All About Android-Google Place APIs-ANDROIDKAWE.Ada ribuan artikel yang sudah terekam ke dalam situs ini,silahkan cari sesuai yang kalian kehendaki,untuk artikel selanjutnya tentang judul diatas bisa kalian baca di bawah ini.

Konten : All About Android-Google Place APIs-ANDROIDKAWE
Judul : All About Android-Google Place APIs-ANDROIDKAWE

lihat juga


All About Android-Google Place APIs-ANDROIDKAWE



Google Place APIs



Google Place API is a service which provides the search system for places. The search with the google place API can be perform by two ways.


1) Text String Search - a normal search specify the search string as text
2) User location based search - a search specified based on the location parameters (latitude,longitude)


You can integrate the places search based on the location in your android application. See the previous example to determine the location of a user and draw a overlay icon pointed to that location of the user.


This post is explaining the implementation of place search by google place API.


The HTTP URL for the place search is as follows

https://maps.googleapis.com/maps/api/place/search/output?parameters

The output could be json or xml and the required parameters are as follows


key - Your application key.
location - latitude,longitude of the place to search
radius - search area in which the search should perform for location
sensor - true or false based on the request is initiated by a devices having a location sensor (GPS) enabled or disabled


The following is the list of optional parameters to refine your search


Keyword — A term to be matched against all content that Google has indexed for the place
Language — The language code, indicating in which language the results should be returned.
Name — A term to be matched against the names of Places. Results will be restricted to those containing the values passed here.
Rankby — Specifies the order in which results are listed. Possible values are:

· Prominence - This option sorts results based on their importance.
· Distance - This option sorts results in ascending order by their distance from the specified location.
· Types — Restricts the results to places matching at least one of the specified types. Types must be separated with a pipe symbol (type1|type2|etc).
· Pagetoken — Returns the next 20 results from a previously run search.



   Code : The following few line of code explain how can you call google web    service in your application.

    String result = "";
HttpClient httpclient = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
ResponseHandler<String> handler = new BasicResponseHandler();
try {
result = httpclient.execute(request, handler);
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
httpclient.getConnectionManager().shutdown();

The Google Place APIs provide a quick way to integrate the context aware search to your application. 


If you like the post please provide your feedback. 


Thanks
Creative Android Apps








Demikianlah Artikel All About Android-Google Place APIs-ANDROIDKAWE

Semoga artikel tentang All About Android-Google Place APIs-ANDROIDKAWE, mudah-mudahan bisa memberi manfaat untuk anda semua.

Anda sedang membaca artikel All About Android-Google Place APIs-ANDROIDKAWE dan artikel ini url permalinknya adalah http://androidkawe.blogspot.com/2012/07/all-about-android-google-place-apis.html Semoga artikel ini bisa bermanfaat.Sekali lagi,ini adalah situs auto yang tidak ditulis langsung oleh admin,Kami tidak menjamin akan kebenaran dari artikel yang tertulis.
Back To Top