Skip to content

Commit

Permalink
Merge pull request #5 from iddqd1/master
Browse files Browse the repository at this point in the history
works with ajax
  • Loading branch information
digi604 committed Aug 7, 2014
2 parents dd9d214 + 024790f commit 1855739
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions djangocms_googlemap/templates/cms/plugins/googlemap.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{% load i18n sekizai_tags %}

{% addtoblock "js" %}
<script type="text/javascript" src="https://maps-api-ssl.google.com/maps/api/js?v=3&amp;sensor=true"></script>
{% endaddtoblock %}

{% addtoblock "js" %}
<script type="text/javascript">
(function () {
function initializeMap{{ object.pk}}() {
// save settings form plugin
var container = 'google-map-{{ object.pk }}';
var latlng = new google.maps.LatLng(46.94708, 7.445975); // default to switzerland
Expand Down Expand Up @@ -65,10 +61,16 @@
infowindow.open(map, marker);
{% endif %}
}
})();
};
</script>
{% endaddtoblock %}

{% addtoblock "js" %}
<script type="text/javascript" src="https://maps-api-ssl.google.com/maps/api/js?v=3&amp;sensor=true&amp;callback=initializeMap{{ object.pk }}"></script>
{% endaddtoblock %}



<div class="plugin_googlemap">
{% if object.get_title %}<h2>{{ object.get_title }}</h2>{% endif %}

Expand Down

0 comments on commit 1855739

Please sign in to comment.