We have recently been notified of a problem where the Maps generated by our IP Mapping using the Google Maps API were never completing.

Viewing the Java console log we could see that there were reported problems as follows:

Blocked loading mixed active content "http://maps.googleapis.com/maps/api/js?v=3&key=xxxxxxxxxxxxxxxxxxx"[Learn More] https://www.zzzzzzzz.com/ip-maps-and-visitors">ip-maps-and-visitors
JQMIGRATE: Migrate is installed, version 1.4.1 https://d2sznybf8qa7e0.cloudfront.net/media/jui/js/jquery-migrate.min.js:2:542">jquery-migrate.min.js:2:542
Blocked loading mixed active content "http://maps.googleapis.com/maps/api/js?v=3&key=xxxxxxxxxxxxx"[Learn More] https://www.zzzzzzzz/ip-maps-and-visitors">ip-maps-and-visitors
Loading failed for the <script> with source “http://maps.googleapis.com/maps/api/js?v=3&key=xxxxxxxxxxxxx”. https://www.zzzzzzzz.com/ip-maps-and-visitors:61:1">ip-maps-and-visitors:61:1
 ReferenceError: google is not defined[Learn More] https://www.zzzzzzzz.com/ip-maps-and-visitors:94:11">ip-maps-and-visitors:94:11
 
Where xxxxxxxx is the specified API key, and zzzzzzzz is the web site which reported the problem, which we have masked for security problems.
 
This seemed to be a situation of a site using https yet the code still using http for the internal addresses, and further investigation revealed that this was indeed the case.

However in looking further we discovered a few further interesting aspects of the use of the Maps API which are worthy of mentioning.

The first is that in line with many cloud computing providers, the Google Maps API moved to a pay-as-you-go pricing structure on 11th June 2018.

The newly-named Google Maps Platform was brought under the Google Cloud umbrella and consists of three core products: Maps (for delivering customised dynamic maps, Street Views and 360° views), Routes (directions and traffic) and Places (location names, addresses, reviews etc). Each has its own pricing structure.

More importantly the new pricing strategy employed by Google for their Maps Platform is a freemium one – all users get to make $200-worth of API calls for free each month.  Thjs means that one has to use an API Key and register a billing account, even if you never are going to pay.  Even if your usage falls well within the free $200 credit, you still have to create an account and provide Google with billing details to keep using the APIs.  It should be possible to set up a usage cap, but we have been unable to do this yet, until the 'free' time expires.

It is also important to add some restriction on the API key to secure it. We found this web page How to Fix “This page didn’t load Google Maps correctly” Error.

This proved very useful in setting up an API Key, although we did encounter some problems setting up the HTTP referrers, in getting them to 'take'.

The fix involved us modifying the code in two php files located in the Jooma/modules/mod_ipmapping_mapper directory. These files named 'mod_ipmapping_mapper.php' and 'minify_js.php', were modified to change the internal http prefix to https and this resolved the coding problem.   The latter file is probably the more important to change. The official fix will be included in the next schedued release.