Subversion Repositories wpShopGermany4

Rev

Rev 5261 | Rev 7612 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5261 Rev 5866
Line 1... Line 1...
1
<?php
1
<?php
2
 
2
 
3
	/**
3
	/**
4
	 * Template für die Anzeige der Kundenkarte innerhalb des Statistikmoduls
4
	 * Template f�r die Anzeige der Kundenkarte innerhalb des Statistikmoduls
5
	 */
5
	 */
6
 
6
 
7
?> 
7
?> 
8
<script type="text/javascript">/* <![CDATA[ */
8
<script type="text/javascript">/* <![CDATA[ */
9
	
9
	
Line 16... Line 16...
16
      		mapTypeId: google.maps.MapTypeId.ROADMAP
16
      		mapTypeId: google.maps.MapTypeId.ROADMAP
17
    	};
17
    	};
18
 
18
 
19
    	var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
19
    	var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
20
    	var bounds = new google.maps.LatLngBounds();
20
    	var bounds = new google.maps.LatLngBounds();
-
 
21
    	var markers = [];
21
     	
22
    	
22
    	<?php $i = 1; foreach ($this->view['wpsg_mod_statistics']['marker'] as $m) { ?>
23
    	<?php $i = 1; foreach ($this->view['wpsg_mod_statistics']['marker'] as $m) { ?>
23
    	var marker<?php echo $i; ?> = new google.maps.Marker({
24
    	var marker<?php echo $i; ?> = new google.maps.Marker({
24
			position: new google.maps.LatLng(<?php echo $m['long']; ?>, <?php echo $m['lat']; ?>),
25
			position: new google.maps.LatLng(<?php echo $m['lat']; ?>, <?php echo $m['long']; ?>),
25
			map: map
26
			map: map
26
    	} );    	
27
    	} );    	
-
 
28
    	markers.push(marker<?php echo $i; ?>);
-
 
29
 
27
    	google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
30
    	google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
28
			location.href = '<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$m['customer']['id']; ?>';
31
			location.href = '<?php echo WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id='.$m['customer']['id']; ?>';
29
    	} );    	  
32
    	} );    	  
30
    	bounds.extend(marker<?php echo $i; ?>.getPosition());  	
33
    	bounds.extend(marker<?php echo $i; ?>.getPosition());  	
31
    	<?php $i ++; } ?>
34
    	<?php $i ++; } ?>
32
 
35
 
33
    	map.fitBounds(bounds);
36
    	map.fitBounds(bounds);
34
    	map.setZoom(15);
37
    	map.setZoom(15);
-
 
38
 
-
 
39
        var markerCluster = new MarkerClusterer(map, markers,
-
 
40
                {imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
-
 
41
        	
35
    	
42
    	
36
  	} // function wpsg_mod_statistics_initialize() 
43
  	} // function wpsg_mod_statistics_initialize() 
37
 
44
 
38
	google.maps.event.addDomListener(window, 'load', wpsg_mod_statistics_initialize);
45
	google.maps.event.addDomListener(window, 'load', wpsg_mod_statistics_initialize);
39
 
46