summaryrefslogtreecommitdiff
path: root/views/mods/mod_statistics/customermap/all.phtml
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-01-14 14:55:36 +0000
commitad405c7045c6e242080ec9d3ce4c9e586b517c4f (patch)
treeb41905f4d27f3eaaabd5bad3a39f8d3873540b46 /views/mods/mod_statistics/customermap/all.phtml
- Testweise 4
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5261 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_statistics/customermap/all.phtml')
-rw-r--r--views/mods/mod_statistics/customermap/all.phtml48
1 files changed, 48 insertions, 0 deletions
diff --git a/views/mods/mod_statistics/customermap/all.phtml b/views/mods/mod_statistics/customermap/all.phtml
new file mode 100644
index 0000000..b35624c
--- /dev/null
+++ b/views/mods/mod_statistics/customermap/all.phtml
@@ -0,0 +1,48 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Kundenkarte innerhalb des Statistikmoduls
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_mod_statistics_initialize()
+ {
+
+ var mapOptions = {
+ center: new google.maps.LatLng(-34.397, 150.644),
+ zoom: 5,
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ };
+
+ var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
+ var bounds = new google.maps.LatLngBounds();
+
+ <?php $i = 1; foreach ($this->view['wpsg_mod_statistics']['marker'] as $m) { ?>
+ var marker<?php echo $i; ?> = new google.maps.Marker({
+ position: new google.maps.LatLng(<?php echo $m['long']; ?>, <?php echo $m['lat']; ?>),
+ map: map
+ } );
+ google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
+ location.href = '<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$m['customer']['id']; ?>';
+ } );
+ bounds.extend(marker<?php echo $i; ?>.getPosition());
+ <?php $i ++; } ?>
+
+ map.fitBounds(bounds);
+ map.setZoom(15);
+
+ } // function wpsg_mod_statistics_initialize()
+
+ google.maps.event.addDomListener(window, 'load', wpsg_mod_statistics_initialize);
+
+/* ]]> */</script>
+
+<div style="" id="wpsg_mod_customermap_layer">
+ <div class="postbox" id="wpsg_modcustomermap">
+ <div style="height:500px;">
+ <div style="width:100%; height:100%" id="wpsg_mod_statistics_map"></div>
+ </div>
+ </div>
+</div> \ No newline at end of file