Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Maps support #152

arvgta opened this issue Jul 4, 2018 · 1 comment

Google Maps support #152

arvgta opened this issue Jul 4, 2018 · 1 comment


Copy link

arvgta commented Jul 4, 2018

In the last while, I have been trying to add Google Maps support to Ajaxify.

Here is the salient HTML I'm trying out now, which should be placed on the target page (only):

<div id="map"></div>
<script>function initMap() {  
    var map = new google.maps.Map(document.getElementById('map'), {
    zoom: 15,
    center: {lat: 48.1351253, lng: 11.581980499999986}
<script async defer src=";callback=initMap"></script>
<script>typeof(google) !== "undefined" && initMap();</script>

(the last line I have made up myself, for the approach to work with Ajaxify)

You can see it working without issues on these two sites:

However, it fails on this site:

...with the following error message in the console: ...initMap is not a function...

Any ideas, why the third demo doesn't work?

All three demos share the above code. In all three cases the div id="map" is dimensioned generously in the respective stylesheets to reserve space for the map. The only striking difference to Demo 3 is that some scripts, including Ajaxify are loaded later. It is a Bootstrap + Ajaxify site with extremely clean HTML, whereas the first two demos are Wordpress + Ajaxify sites.

Copy link
Owner Author

arvgta commented Sep 4, 2018

I hope Demo 3 fails due to the architecture of the site only.

Further documention may be placed here.

Closing... Please re-open, when in doubts.

@arvgta arvgta closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant