diff options
| author | hartmut <noreply@maennchen1.de> | 2016-10-21 14:14:00 +0000 |
|---|---|---|
| committer | hartmut <noreply@maennchen1.de> | 2016-10-21 14:14:00 +0000 |
| commit | ad164f505a7bd14de7a7d177a8be256499974c09 (patch) | |
| tree | d942e84a53752041f8d59ca68e97ae871adaf68a /views/mods/mod_statistics/customermap/all.phtml | |
| parent | 1f48113a90c745e51778d7c8801ca138f4661edb (diff) | |
Shop4 Korrekturen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5866 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_statistics/customermap/all.phtml')
| -rw-r--r-- | views/mods/mod_statistics/customermap/all.phtml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/views/mods/mod_statistics/customermap/all.phtml b/views/mods/mod_statistics/customermap/all.phtml index b35624c..20e86d4 100644 --- a/views/mods/mod_statistics/customermap/all.phtml +++ b/views/mods/mod_statistics/customermap/all.phtml @@ -1,7 +1,7 @@ <?php
/**
- * Template für die Anzeige der Kundenkarte innerhalb des Statistikmoduls
+ * Template f�r die Anzeige der Kundenkarte innerhalb des Statistikmoduls
*/
?>
@@ -18,12 +18,15 @@ var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
var bounds = new google.maps.LatLngBounds();
-
+ var markers = [];
+
<?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']; ?>),
+ position: new google.maps.LatLng(<?php echo $m['lat']; ?>, <?php echo $m['long']; ?>),
map: map
} );
+ markers.push(marker<?php echo $i; ?>);
+
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']; ?>';
} );
@@ -32,6 +35,10 @@ map.fitBounds(bounds);
map.setZoom(15);
+
+ var markerCluster = new MarkerClusterer(map, markers,
+ {imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
+
} // function wpsg_mod_statistics_initialize()
|
