fanningert / kirbycms-extension-gmaps

This is a Kirbytag to integrate Google Maps API in your website
GNU General Public License v3.0
10 stars 2 forks source link

InvalidValueError: initialize is not a function #16

Open AlexKucera opened 8 years ago

AlexKucera commented 8 years ago

Hi,

I am trying to install GMaps on a clients web site. I went with the manual install route, but am receiving an "InvalidValueError: initialize is not a function" error when trying to view the page with the map on it.

My header looks like this:

<!-- loading the GoogleMaps API -->
    <script src="<?php echo at\fanninger\kirby\extension\gmaps\GMaps::getGoogleMapsJSApiUrl(); ?>"></script>
<!-- loading the GMaps script -->
    <?php echo js('assets/js/gmaps.js'); ?>

I am using a minified local version of jQuery v2.1.4. But I also tried it with the one you use in the example.

I am at the moment just trying to display the example map with (googlemaps lat: 35.7152128 lng: 139.7981552 zoom: 4)

I have googled around but nothing seems to fit this specific case and none of the proposed solutions work, so far.

The site is also online at http://frisoer-nebel.de/dev/contact if you care to take a look.

fanningert commented 8 years ago

Ok, google changed the API. callback=initialise parameter is no more supported in that form.

http://stackoverflow.com/questions/38369151/google-maps-uncaught-invalidvalueerror-initialise-is-not-a-function

I will update the code to a working version. Currently you can test it, to remove the parameter callback=initialise in the file kirbycms-extension-gmaps-lib.php on the line 694 and 696.

Regard Thomas