android - How can I filter by city in the Places API using nearby place? -


i program in location, want show schools under san juan , manila.

this code:

@override public void onclick(view v) {      int selectedposition = msprplacetype.getselecteditemposition();     string type = mplacetype[selectedposition];      stringbuilder sb = new stringbuilder("https://maps.googleapis.com/maps/api/place/nearbysearch/json?");     sb.append("location="+mlatitude+","+mlongitude);     sb.append("&radius=3000");     sb.append("&types=(locality)manila+sanjuan|university");     sb.append("&sensor=true");     sb.append("&key=aizasydrfvbwi32y74-tdxcmfyqyazvv1t5vaku"); 

to this, need implement post filter on results of search. should fine if search radius covers these 2 regions.

to post filter, use address_components returned placedetails requests (https://developers.google.com/places/webservice/details) filter using "locality" address component.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -