Hi,

I have a strange one for you... I'm a newb so hope I'm not doing something completely daft...

I'm using GMap with the Location module.

After much thrashing I realised I needed a Google API key and I finally got things working. That is to say I got things working on *one* instance of a particular content type.

When creating a new instance/page/node of the given content type, I see the field where I can enter my UK postcode. On the first page I created, the corresponding map dutifully appeared. On subsequent pages the map refuses to appear, although the location field is harvesting my second postcode.

What am I doing wrong? I'm struggling to comprehend how one instance of a content type is different from another...?

S

Comments

SMartin created an issue.

SMartin’s picture

Just noticed this in my log too...

Google geocoding returned status code: REQUEST_DENIED for the query url: https://maps.googleapis.com/maps/api/geocode/json?region=gb&address=nn13...

My key should definitely be valid...

SMartin’s picture

Looking at the source of the various pages, it looks to my untrained eye as if the GMap module just isn't being seen by the second page:

On page where map is visible:

</script>
<script type="text/javascript" src="http://www.mysite.com/modules/toolbar/toolbar.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/gmap.js?oi310p"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&amp;language=en&amp;sensor=false&amp;libraries=geometry&amp;key=AIzaSyBHB8qhlfvAsTn__t7v85Y5nVylr-Nj1Bk"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/icon.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/marker.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/highlight.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/poly.js?oi310p"></script>
<script type="text/javascript" src="/sites/default/files/js/gmap_markers.js"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/markerloader_static.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/gmap/js/gmap_marker.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/jquery.hoverIntent.minified.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/sfsmallscreen.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/supposition.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/superfish.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/supersubs.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/superfish/superfish.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/themes/nucleus/nucleus/js/jquery.cookie.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/themes/tb_rave/js/tb_rave.js?oi310p"></script>
<script type="text/javascript">

On page where map isn't visible:

</script>
<script type="text/javascript" src="http://www.mysite.com/modules/toolbar/toolbar.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/jquery.hoverIntent.minified.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/sfsmallscreen.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/supposition.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/superfish.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/libraries/superfish/supersubs.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/modules/superfish/superfish.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/themes/nucleus/nucleus/js/jquery.cookie.js?oi310p"></script>
<script type="text/javascript" src="http://www.mysite.com/sites/all/themes/tb_rave/js/tb_rave.js?oi310p"></script>
<script type="text/javascript">
SMartin’s picture

When I re-geocoded the page where the map *was* visible, that broke too. Consistency anyway...

Now I can't get *any* maps to show.

SMartin’s picture

**FIXED**

I needed to update the API code buried in the 'Location' module.