places API JS V3 -- html_attributions (ex : Listings by yellow pages)

889 views
Skip to first unread message

Francis Carriere

unread,
Jul 21, 2011, 9:35:55 AM7/21/11
to google-map...@googlegroups.com
Hello!

I'm using the places API. I have to make multiple calls, and every time I make a call it adds to the maps (on the bottom right) "Listings by yellow pages".

So  if I make multiple call, eventually it just fills up the whole right side of the screen with tens of "Listings by yellow pages".

Anyone know a way to clear these? On the documentation it says html_attributions must be displayed to the user...is there a way to handle it ourselves instead of it being added automatically on the map?

Thank you!

Chris Broadfoot

unread,
Jul 21, 2011, 8:06:35 PM7/21/11
to google-map...@googlegroups.com
Could you post a link? The Places API itself doesn't add anything to your page. You probably have code that looks like this...

attributionDiv.innerHTML += placesResult.attribution;
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/yyHZY5Fxgf4J.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Jr. Hames

unread,
Sep 1, 2011, 2:06:57 PM9/1/11
to Google Maps JavaScript API v3
Hi Francis,

this is happening probably because you are creating a new
google.maps.places.PlacesService for each search. Try creating a
PlacesService and store it somewhere to use it for further searchs.

I hope it helps.

Cheers,
Jr. Hames

On Jul 21, 9:06 pm, Chris Broadfoot <c...@google.com> wrote:
> Could you post a link? The Places API itself doesn't add anything to your
> page. You probably have code that looks like this...
>
> attributionDiv.innerHTML += placesResult.attribution;
>
>  --http://twitter.com/broady

Sandeep

unread,
Jun 14, 2012, 1:12:43 PM6/14/12
to google-map...@googlegroups.com
How did you fix it? I have the same problem - see marathi.org.

Sandeep

Jr. Hames

unread,
Jun 14, 2012, 2:16:09 PM6/14/12
to google-map...@googlegroups.com
Sandeep, 

Please, see my previous message on this thread. I've received an email from another user reporting that my solution fix this issue.

Jr. Hames



--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.

Sandeep Dixit

unread,
Jun 14, 2012, 4:52:19 PM6/14/12
to google-map...@googlegroups.com
Hmm - the PlacesService class requires Map as a parameter to initialize. So not sure if I can do service as a class level variable when I don't have map defined yet. 

Please advise.
Sandeep

Amol Tilakram Barewar

unread,
Sep 16, 2015, 6:53:26 AM9/16/15
to Google Maps JavaScript API v3
Hi Jr. Hames,

As suggested from you now I have created only one instance of
google.maps.places.PlacesService.

Now I am not getting multiple link 'Listings by OpenRice'  in left bottom of google map. But I am getting link 'Listings by OpenRice' for once in the left bottom of map.

How can I avoid even single occurrence of link ''Listings by OpenRice' in my map?

Using a smartphone? Try our app for property search and app for residential communities.
------------------------------------------------------------------------------------------------------------------
This e-mail and any files transmitted with it may contain confidential and privileged information are for the sole use of the intended recipient(s) . If you are not the intended recipient, please appraise the sender by reply e-mail and destroy all copies and the original message. Any unauthorized disclosure, dissemination, forwarding, printing or copying of this email or any action taken on this e-mail is strictly prohibited and may be unlawful.
Reply all
Reply to author
Forward
0 new messages