bashu / django-easy-maps

🗺 Google Maps with easy!
MIT License
145 stars 56 forks source link

Multiple API Inclusions / Modal Window #59

Closed seaapple closed 8 years ago

seaapple commented 8 years ago

I have a map in a bootstrap modal. Everything seems to be working but keep getting this error:

"You have included the Google Maps API multiple times on this page. This may cause unexpected error"

How can I prevent the maps API from loading multiple times?

bashu commented 8 years ago

hey @seaapple extend / override easy_maps/map.html:

...
{% block api_js %}{# remove  https://maps.google.com/maps/api/js #}{% enblock %}
...

put

<script type="text/javascript" src="https://maps.google.com/maps/api/js"></script>

into base template

bashu commented 8 years ago

@seaapple feel free to reopen...

seaapple commented 8 years ago

Thank you! That worked perfectly.


From: Basil Shubin notifications@github.com Sent: October 14, 2016 5:41:54 AM To: bashu/django-easy-maps Cc: seaapple; Mention Subject: Re: [bashu/django-easy-maps] Multiple API Inclusions / Modal Window (#59)

@seaapplehttps://github.com/seaapple feel free to reopen...

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bashu/django-easy-maps/issues/59#issuecomment-253755323, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFmugoq4MU1zeJAbiHcQ2SpocKp80qvmks5qz05igaJpZM4JeYLy.