If the API key for version V3 is used, the AdSense ads stops appearing.

922 views
Skip to first unread message

Shobha Rishiraj

unread,
Dec 23, 2012, 10:47:46 PM12/23/12
to google-map...@googlegroups.com

If the API key for version V3 is used, the AdSense ads stops appearing.
If the key is not used, it displays the map as well as the AdSense ads.
As per the rule, the map should not work without the API key.

I will like to use the assigned API key without blocking the AdSense ads.
Can any body suggest the  necessary corrections  required?

 

Test Example: http://www.replyat.com/Maptest-V3.asp

geoco...@gmail.com

unread,
Jan 7, 2013, 2:52:48 AM1/7/13
to Google Maps JavaScript API v3
On Dec 23 2012, 7:47 pm, Shobha Rishiraj <replysho...@gmail.com>
wrote:
> If the API key for version V3 is used, the AdSense ads stops appearing.
> If the key is not used, it displays the map as well as the AdSense ads.
> As per the rule, the map should not work without the API key.

The Google Maps API v3 does not require a key. It is only needed if
you exceed the free quotas on services and want to be able to pay for
additional quota or if you want to track your use of Google's
services.

>
> I will like to use the assigned API key without blocking the AdSense ads.
> Can any body suggest the  necessary corrections  required?
>
> Test Example:http://www.replyat.com/Maptest-V3.asp

I get these messages in the javascript console in Chrome:

Warning: you have included the Google Maps API multiple times on this
page. This may cause unexpected errors. main.js:42
Uncaught Error: Invalid value for property <map>: [object Object]
%7Bmain,adsense%7D.js:1
Uncaught TypeError: object is not a function

Maybe if you address them the problem will go away.

-- Larry

Shobha Rishiraj

unread,
Jan 7, 2013, 9:49:19 AM1/7/13
to google-map...@googlegroups.com
How it will be possible for Google or the user to monitor the limit of free quotas without the use of key for API v3 ?

In case the user is also interested to track usage limit by using the API v3 key and is also interested to display AdSense ads,  why that should not work?

It may be true that Version 3 will work without a key; but there is no guarantee that they will continue to do so; and using a key brings the benefits of statistics reporting.




--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
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.


Enoch Lau (Google Employee)

unread,
Jan 7, 2013, 5:42:49 PM1/7/13
to google-map...@googlegroups.com
As Larry already noted, you're loading the Maps API twice. See https://developers.google.com/maps/documentation/javascript/tutorial#HelloWorld
To unsubscribe from this group, send email to google-maps-js-api-v3+unsub...@googlegroups.com.

Shobha Rishiraj

unread,
Jan 7, 2013, 9:30:33 PM1/7/13
to google-map...@googlegroups.com
The test Example:http://www.replyat.com/Maptest-V3.asp display the map in two display modes.

In first mode  where it is showing the button on right top “ Set API key On “, the source code of the page shows that no API key is being used. Here the AdSense ads are visible.

In the second mode, that appears after clicking the button “Set API key on “, the source code of the page is showing that the API key is being used only on one location ( Not Google Maps API multiple times on this
page) and rest of the script is exactly identical to the first mode.  Here there is no problem with the map display but the AdSense code is not responding.

I have also tested the script in Chrome browser. There is no warning message and both options are demonstrating differently as already explained.

The ASP script is being used only to get the user location and  insert the following part of the script:

<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1OlHCJxoI_0DPU&sensor=false"></script>

_______________________________



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.
Message has been deleted

geoco...@gmail.com

unread,
Jan 8, 2013, 2:25:34 AM1/8/13
to Google Maps JavaScript API v3
On Jan 7, 6:30 pm, Shobha Rishiraj <replysho...@gmail.com> wrote:
> The test Example:http://www.replyat.com/Maptest-V3.aspdisplay the map in
> two display modes.
>
> *In first mode*  where it is showing the button on right top “ Set API key
> On “, the source code of the page shows that no API key is being used. Here
> the AdSense ads are visible.
>
> *In the second mode*, that appears after clicking the button “Set API key
> on “, the source code of the page is showing that the API key is being used
> only on one location ( Not Google Maps API multiple times on this
> page) and rest of the script is exactly identical to the first mode.  Here
> there is no problem with the map display but the AdSense code is not
> responding.
>
> I have also tested the script in Chrome browser. There is no warning
> message and both options are demonstrating differently as already explained.
>
> The ASP script is being used only to get the user location and  insert the
> following part of the script:
>
> <script type="text/javascript" src="//
> maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1OlHCJxoI_0DPU &sensor=false"></script>

Which is the second include of the API. When I view the source on
that page, I see:

<script src="https://maps.googleapis.com/maps/api/js?
v=3.exp&sensor=false&libraries=adsense"></script>
<script type="text/javascript" src="//maps.googleapis.com/maps/
api/
js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1OlHCJxoI_0DPU&sensor=false"></
script>

It needs to be:

<script src="https://maps.googleapis.com/maps/api/js?
v=3.exp&sensor=false&libraries=adsense&key=AIzaSyA9Fp-zeZB-
yQeiA8ARj1OlHCJxoI_0DPU"></script>

--- Larry




>
> _______________________________
>
> On Tue, Jan 8, 2013 at 4:12 AM, Enoch Lau (Google Employee) <
>
>
>
>
>
>
>
> enoch...@google.com> wrote:
> > As Larry already noted, you're loading the Maps API twice. See
> >https://developers.google.com/maps/documentation/javascript/tutorial#...
>
> > On Tuesday, January 8, 2013 1:49:19 AM UTC+11, shobha wrote:
>
> >> How it will be possible for Google or the user to monitor the limit of
> >> free quotas without the use of key for API v3 ?
>
> >> In case the user is also interested to track usage limit by using the API
> >> v3 key and is also interested to display AdSense ads,  why that should not
> >> work?
>
> >> It may be true that Version 3 will work without a key; but there is no
> >> guarantee that they will continue to do so; and using a key brings the
> >> benefits of statistics reporting.
>
> >> On Mon, Jan 7, 2013 at 1:22 PM, geoco...@gmail.com <geoco...@gmail.com>wrote:
>
> >>> On Dec 23 2012, 7:47 pm, Shobha Rishiraj <replysho...@gmail.com>
> >>> wrote:
> >>> > If the API key for version V3 is used, the AdSense ads stops appearing.
> >>> > If the key is not used, it displays the map as well as the AdSense ads.
> >>> > As per the rule, the map should not work without the API key.
>
> >>> The Google Maps API v3 does not require a key.  It is only needed if
> >>> you exceed the free quotas on services and want to be able to pay for
> >>> additional quota or if you want to track your use of Google's
> >>> services.
>
> >>> > I will like to use the assigned API key without blocking the AdSense
> >>> ads.
> >>> > Can any body suggest the  necessary corrections  required?
>
> >>> > Test Example:http://www.replyat.**com/Maptest-V3.asp<http://www.replyat.com/Maptest-V3.asp>
>
> >>> I get these messages in the javascript console in Chrome:
>
> >>> Warning: you have included the Google Maps API multiple times on this
> >>> page. This may cause unexpected errors. main.js:42
> >>> Uncaught Error: Invalid value for property <map>: [object Object]
> >>> %7Bmain,adsense%7D.js:1
> >>> Uncaught TypeError: object is not a function
>
> >>> Maybe if you address them the problem will go away.
>
> >>>   -- Larry
>
> >>> --
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Google Maps JavaScript API v3" group.
> >>> To post to this group, send email to google-map...@**googlegroups.com.
>
> >>> To unsubscribe from this group, send email to google-maps-js-api-v3+**
> >>> unsub...@googlegroups.com.
> >>> For more options, visit this group athttp://groups.google.com/**
> >>> group/google-maps-js-api-v3?**hl=en<http://groups.google.com/group/google-maps-js-api-v3?hl=en>
> >>> .

Enoch Lau (Google Employee)

unread,
Jan 8, 2013, 7:07:54 AM1/8/13
to google-map...@googlegroups.com
You are loading it twice; you have both:


To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscri...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Shobha Rishiraj

unread,
Jan 9, 2013, 12:29:15 AM1/9/13
to google-map...@googlegroups.com
If  I do not use the following ( … libraries=adsense …), the AdSense ads stops appearing.If I use only the following script for v3 API key, the AdSense ads stops appearing.If I do not use both of the above scripts, map as well as AdSense ads stops appearing.

I have modified the following test example to demonstrate all the possible options.

Example: http://www.replyat.com/Maptest-V3.asp

So, the AdSense ads stops appearing  if I don’t use the adsense libraries  and use the assigned v3 API key only.

I will like to use the assigned API key without blocking the AdSense ads and without loading the API twice.




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.

geoco...@gmail.com

unread,
Jan 9, 2013, 1:30:31 AM1/9/13
to Google Maps JavaScript API v3
On Jan 8, 9:29 pm, Shobha Rishiraj <replysho...@gmail.com> wrote:
> If  I do not use the following ( … libraries=adsense …), the
> AdSense ads stops appearing.
>
> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&librarie..."></script>
>
> If I use only the following script for v3 API key, the AdSense ads
> stops appearing.
>
> <script type="text/javascript" src="//
> maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1OlHCJxoI_0DPU &sensor=false
> "></script>

No adsense library.

>
> If I do not use both of the above scripts, map as well as AdSense ads stops
> appearing.
>
> I have modified the following test example to demonstrate all the possible
> options.
>
> Example:http://www.replyat.com/Maptest-V3.asp

Works for me with a single include (and my key):
http://www.geocodezip.com/replyat_com_Maptest-V3.html

-- Larry

>
> So, the AdSense ads stops appearing  if I don’t use the adsense libraries
> and use the assigned v3 API key only.
>
> I will like to use the assigned API key without blocking the AdSense ads
> and without loading the API twice.
>
> On Tue, Jan 8, 2013 at 5:37 PM, Enoch Lau (Google Employee) <
>
>
>
>
>
>
>
> enoch...@google.com> wrote:
> > You are loading it twice; you have both:
>
> > <script src="
> >https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&librarie...
> > "></script>
> >  <script type="text/javascript" src="
> > //maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1OlHCJxoI_0D PU&sensor=false<http://maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1...>
> > "></script>
>
> > On Tuesday, January 8, 2013 1:30:33 PM UTC+11, shobha wrote:
>
> >> The test Example:http://www.replyat.**com/Maptest-V3.asp<http://www.replyat.com/Maptest-V3.asp>display the map in two display modes.
>
> >> *In first mode*  where it is showing the button on right top “ Set API
> >> key On “, the source code of the page shows that no API key is being used.
> >> Here the AdSense ads are visible.
>
> >> *In the second mode*, that appears after clicking the button “Set API
> >> key on “, the source code of the page is showing that the API key is being
> >> used only on one location ( Not Google Maps API multiple times on this
> >> page) and rest of the script is exactly identical to the first mode.
> >> Here there is no problem with the map display but the AdSense code is not
> >> responding.
>
> >> I have also tested the script in Chrome browser. There is no warning
> >> message and both options are demonstrating differently as already explained.
>
> >> The ASP script is being used only to get the user location and  insert
> >> the following part of the script:
>
> >> <script type="text/javascript" src="//maps.googleapis.com/**
> >> maps/api/js?key=AIzaSyA9Fp-**zeZB-yQeiA8ARj1OlHCJxoI_0DPU&**sensor=false<http://maps.googleapis.com/maps/api/js?key=AIzaSyA9Fp-zeZB-yQeiA8ARj1...>"></script>
>
> >> ______________________________**_
>
> >> On Tue, Jan 8, 2013 at 4:12 AM, Enoch Lau (Google Employee) <
> >> enoc...@google.com> wrote:
>
> >>> As Larry already noted, you're loading the Maps API twice. See
> >>>https://developers.google.**com/maps/documentation/**
> >>> javascript/tutorial#HelloWorld<https://developers.google.com/maps/documentation/javascript/tutorial#...>
>
> >>> On Tuesday, January 8, 2013 1:49:19 AM UTC+11, shobha wrote:
>
> >>>> How it will be possible for Google or the user to monitor the limit of
> >>>> free quotas without the use of key for API v3 ?
>
> >>>> In case the user is also interested to track usage limit by using the
> >>>> API v3 key and is also interested to display AdSense ads,  why that should
> >>>> not work?
>
> >>>> It may be true that Version 3 will work without a key; but there is no
> >>>> guarantee that they will continue to do so; and using a key brings the
> >>>> benefits of statistics reporting.
>
> >>>> On Mon, Jan 7, 2013 at 1:22 PM, geoco...@gmail.com <geoco...@gmail.com>wrote:
>
> >>>>> On Dec 23 2012, 7:47 pm, Shobha Rishiraj <replysho...@gmail.com>
> >>>>> wrote:
> >>>>> > If the API key for version V3 is used, the AdSense ads stops
> >>>>> appearing.
> >>>>> > If the key is not used, it displays the map as well as the AdSense
> >>>>> ads.
> >>>>> > As per the rule, the map should not work without the API key.
>
> >>>>> The Google Maps API v3 does not require a key.  It is only needed if
> >>>>> you exceed the free quotas on services and want to be able to pay for
> >>>>> additional quota or if you want to track your use of Google's
> >>>>> services.
>
> >>>>> > I will like to use the assigned API key without blocking the AdSense
> >>>>> ads.
> >>>>> > Can any body suggest the  necessary corrections  required?
>
> >>>>> > Test Example:http://www.replyat.**com**/Maptest-V3.asp<http://www.replyat.com/Maptest-V3.asp>
>
> >>>>> I get these messages in the javascript console in Chrome:
>
> >>>>> Warning: you have included the Google Maps API multiple times on this
> >>>>> page. This may cause unexpected errors. main.js:42
> >>>>> Uncaught Error: Invalid value for property <map>: [object Object]
> >>>>> %7Bmain,adsense%7D.js:1
> >>>>> Uncaught TypeError: object is not a function
>
> >>>>> Maybe if you address them the problem will go away.
>
> >>>>>   -- Larry
>
> >>>>> --
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "Google Maps JavaScript API v3" group.
> >>>>> To post to this group, send email to google-map...@**googlegroups.com*
> >>>>> *.
>
> >>>>> To unsubscribe from this group, send email to google-maps-js-api-v3+**
> >>>>> unsubscr**i...@googlegroups.com.
> >>>>> For more options, visit this group athttp://groups.google.com/**group
> >>>>> **/google-maps-js-api-v3?**hl=en<http://groups.google.com/group/google-maps-js-api-v3?hl=en>
> >>>>> .
>
> >>>>  --
> >>> 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 visithttps://groups.google.com/d/**
> >>> msg/google-maps-js-api-v3/-/**RjcWVKFQXdMJ<https://groups.google.com/d/msg/google-maps-js-api-v3/-/RjcWVKFQXdMJ>
> >>> .
>
> >>> To post to this group, send email to google-map...@**googlegroups.com.
> >>> To unsubscribe from this group, send email to google-maps-js-api-v3+**
> >>> unsub...@googlegroups.com.
> >>> For more options, visit this group athttp://groups.google.com/**
> >>> group/google-maps-js-api-v3?**hl=en<http://groups.google.com/group/google-maps-js-api-v3?hl=en>
> >>> .
>

Rossko

unread,
Jan 9, 2013, 4:53:58 AM1/9/13
to google-map...@googlegroups.com
I have modified the following test example to demonstrate all the possible options.
The option you seem to have missed out is specifying adsense library and key in one API call.  Do not call the API twice.
Example
 

 

Shobha Rishiraj

unread,
Jan 10, 2013, 9:37:19 AM1/10/13
to google-map...@googlegroups.com
Thanks for guidance
Issue of http://www.replyat.com/Maptest-V3.asp is solved at http://www.replyat.com/Maptest-V3-2.asp
It is solved by using adsense library and API key for version V3 in one API call.


 

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
Reply all
Reply to author
Forward
0 new messages