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 9150545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:37:31+00:00 2026-06-17T11:37:31+00:00

I am trying to use the google places library for a nearby search request:

  • 0

I am trying to use the google places library for a nearby search request:
https://developers.google.com/maps/documentation/javascript/places#place_search_requests

i just want to pull the json response and put it in a html list, i do now want to show results on a map or something else. I do not want to use map at all. But in documentation it states that there has to be a map

service = new google.maps.places.PlacesService(**map**);

in order to pass it as an argument in the PlacesService function. What i do now is adding a map with height:0 but it still consumes much amount of memory (i develop a sencha touch 2 app and memory is important). Is there any workaround of using nearby search requests without a map? I do not want to use the Google Places API as it does not support JSONP requests.

  • 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-17T11:37:32+00:00Added an answer on June 17, 2026 at 11:37 am

    As documented the PlacesService accepts as argument either a map or an node where to render the attributions for the results.

    So you only have to use the node (a node being an html element) instead of the map.

    Please note: hiding the attributions violates the places-policies(also hiding the map when used as argument, because the map will show the attributions)

    This also may be interesting to you: Google places API does this violate the TOC?


    Example: in a nutshell

    If you’re using jQuery:

    var service = new google.maps.places.PlacesService($('#tag-id').get(0));
    

    If plain Javascript:

    var service = new google.maps.places.PlacesService(document.createElement('div'));
    

    Then carry on as usual with the rest of the example code:

      service.nearbySearch(request, callback);
    

    Example: using details returned

    Live demo of this example on jsFiddle.

    Note: This example uses jQuery.

    <ul class="reviews__content" id="reviews__content">
    </ul>
    <div id="service-helper"></div>
    
    <script async defer
    src="https://maps.googleapis.com/maps/api/js?key=GOOGLE_API_KEY_HERE&libraries=places&callback=getRelevantGoogleReviews">
    </script>
    <script type="text/javascript">
       window.getRelevantGoogleReviews = function(){
         var service = new google.maps.places.PlacesService($('#service-helper').get(0)); // note that it removes the content inside div with tag '#service-helper'
    
         service.getDetails({
             placeId: 'ChIJAwEf5VFQqEcRollj8j_kqnE'  // get a placeId using https://developers.google.com/places/web-service/place-id
            }, function(place, status) {
                if (status === google.maps.places.PlacesServiceStatus.OK) {
                  var resultcontent = '';
                  for (i=0; i<place.reviews.length; ++i) {
                    //window.alert('Name:' + place.name + '. ID: ' + place.place_id + '. address: ' + place.formatted_address);
                    resultcontent += '<li class="reviews__item">'
                    resultcontent += '<div class="reviews__review-er">' + place.reviews[i].author_name + '</div>';
                    var reviewDate = new Date(place.reviews[i].time * 1000);
                    var reviewDateMM = reviewDate.getMonth() + 1;
                    var reviewDateFormatted = reviewDate.getDate() + '/' + reviewDateMM + '/' + reviewDate.getFullYear(); 
                    resultcontent += '<div class="reviews__review-date">' + reviewDateFormatted + '</div>';
                    resultcontent += '<div class="reviews__review-rating reviews__review-rating--' + place.reviews[i].rating +'"></div>';
                    if (!!place.reviews[i].text){
                      resultcontent += '<div class="reviews__review-comment">' + place.reviews[i].text + '</div>';
                    }
                    resultcontent += '</li>'
                  }
                  $('#reviews__content').append(resultcontent);
                }
            });
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use this: https://developers.google.com/maps/documentation/javascript/places#places_autocomplete . How do I control the width of
I'm trying to use the latest Google NaCl SDK. Following the instructions at https://developers.google.com/native-client/pepper18/devguide/tutorial
I am trying to use Google's places API. I downloaded google-api-java-client-1.6.0-beta.zip library and I'm
I am trying to use Google Places in Google Maps API v3, but I
I'm trying to use the autocomplete from the Google Places API. I have the
I'm trying to use Google's Images API to search an image and put it
I'm creating an Android app and trying to use Google Places API through Google
I am trying to use places api for google map on my website. As
I'm trying use Places API from Google frmo a node.js server This is the
I am trying to use the geocoding service with the google maps to display

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.