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 script doesn't load #242

Closed
mirzadelic opened this issue Feb 6, 2013 · 2 comments
Closed

google maps script doesn't load #242

mirzadelic opened this issue Feb 6, 2013 · 2 comments

Comments

@mirzadelic
Copy link

Hi,
when i click on line where google maps api is included, it doesn't load it, even if i call script tag in that container div.
How can i do this ?
example eventill.com/calendar and then click on logo, map at bottom is not loaded, and loading spinner is still there.

@tzoro
Copy link

tzoro commented Feb 7, 2013

Hi. Google maps will load if you include it properly. I this there are some other errors on your page that is preventing google maps from execution.

In pjax partial html response you can have something like this, and it should work..

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
// This must be executed after DOM ready
$(document).ready(function() {
 var map;
 var mapOptions = {
  zoom: 8,
  center: new google.maps.LatLng(-34.397, 150.644),
  mapTypeId: google.maps.MapTypeId.ROADMAP
  };
 map = new google.maps.Map(document.getElementById('map_canvas'),mapOptions);
});
</script>

@josh
Copy link
Contributor

josh commented Feb 7, 2013

Inline scripts won't work as expected. You'll want to implement a custom loader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants