[SalesForce] Salesforce1/Google maps tutorial example now shows blank page

About two months back, I was tinkering with the Salesforce1 warehouse tutorial ( Salesforce1 Mobile Workbook. It's the one where you show the location of your warehouses (Salesforce data) on a Google map. This was working for me, but now shows a blank page. To the best of my knowledge, I haven't changed anything in the code. In fact, the error is coming from inside a static resource. FWIW, my sandbox is on cs13.

The error I get now is:

https://maps.gstatic.com/intl/en_us/mapfiles/api-3/14/1/main.js – 404
Not Found

I think the solution is hinted at in the FindNearby Visualforce page here:

...
<!-- Include in Google's Maps API via JavaScript static resource -->
<apex:includeScript value="{!$Resource.googleMapsAPI}" /> 

<!-- Set this API key to fix JavaScript errors in production -->
<!--http://salesforcesolutions.blogspot.com/2013/01/integration-of-salesforcecom-and-google.html-->
<!--<script type="text/javascript" 
    src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false"> 
    </script>-->

Can someone confirm that getting a Google Map Api key will fix this problem for me?

Best Answer

Correct, you will need to get a google maps API key to use this. You can get one here: https://developers.google.com/maps/signup - then paste that key in to that section of the script tag

Related Topic