Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:15:40+00:00 2026-06-11T17:15:40+00:00

Hello I want to search nearest location using google place api…. from https://developers.google.com/places/documentation/supported_types i

  • 0

Hello I want to search nearest location using google place api….

from https://developers.google.com/places/documentation/supported_types i have used types in my code for searching nearest places….

and the code is below

try {
     double radius = 5000; // 10000 meters
    // get nearest places
    nearPlaces = googlePlaces
                    .search(gps.getLatitude(), gps.getLongitude(), radius,
                            "sublocality|sublocality_level_4|sublocality_level_5|sublocality_level_3|sublocality_level_2|sublocality_level_1|neighborhood|locality|sublocality");

    } catch (Exception e) {
    e.printStackTrace();
    }
 return null;
}

but could not find nearest places

like if i am in “San Diego, CA, USA” then i want to get result like

Gaslamp/Downtown,
Pacific Beach,
Ocean Beach,
Uptown,
Hillcrest,
Mission Valley,
Fashion Valley,
North Park,

but instead of this i am getting only two value like

Mission Valley East,
Serra Mesa

so can any one help me what type i have to pass so i can get result like above instead of below result

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:15:41+00:00Added an answer on June 11, 2026 at 5:15 pm

    My previous answer was deleted by a moderator for unknown reasons, I am re-posting with some more context as it is the currently the correct answer:

    It appears you are trying return nearby geographical locations (anything from the second list in the supported place types). Unfortunately the Places API is not designed for this, it is designed to return a list of nearby establishments (anything from the first list in the supported place types) and up to two locality or political type results to to help identify the area you are performing a Place Search request for.

    This is stated in the documentation here:
    https://developers.google.com/places/documentation/search#PlaceSearchResponses

    “results” contains an array of Places, with information about each. See Place Search Results for information about these results. The Places API returns up to 20 establishment results per query. Additionally, political results may be returned which serve to identify the area of the request.

    If you type filter your Place Search request by a geographic location type like locality or political, you will filter out the establishment results and only be left with the area identity results.

    A Places API – Feature Request for returning nearby localities has been filed here:
    http://code.google.com/p/gmaps-api-issues/issues/detail?id=4434

    If you believe this would be a useful feature please make sure your star the request to let us know you are interested in seeing it added.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone i want search data from invoices and client by today date I'm
Hello everyone i want search data from invoices and client by today date I'm
hello i want distance between two place ... means i have two places latitude
Hello i want improve my search page i am using this query to search
Hello I am using indexOf method to search if a string is present inside
Hi I want to search about some characters (or word) in text using JavaScript
I was following this example: http://developer.android.com/resources/tutorials/views/hello-autocomplete.html And I want to know how I can
Hello i am making an small application in which i want search functionality i
We want to search for a string (ie. Hello World) in all our database
hello i'v built a search, using MySQL, PHP and jQuery, this is the search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.