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

瀏覽次數:889 次
跳到第一則未讀訊息

Francis Carriere

未讀,
2011年7月21日 上午9:35:552011/7/21
收件者: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

未讀,
2011年7月21日 晚上8:06:352011/7/21
收件者: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

未讀,
2011年9月1日 下午2:06:572011/9/1
收件者: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

未讀,
2012年6月14日 下午1:12:432012/6/14
收件者:google-map...@googlegroups.com
How did you fix it? I have the same problem - see marathi.org.

Sandeep

Jr. Hames

未讀,
2012年6月14日 下午2:16:092012/6/14
收件者: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

未讀,
2012年6月14日 下午4:52:192012/6/14
收件者: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

未讀,
2015年9月16日 清晨6:53:262015/9/16
收件者: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.
回覆所有人
回覆作者
轉寄
0 則新訊息