Subversion Repositories wpShopGermany4

Rev

Rev 7612 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7612 Rev 8092
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
	
10
	function wpsg_mod_statistics_initialize() 
10
	function wpsg_mod_statistics_initialize() 
11
	{
11
	{
Line 18... Line 18...
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
    	var markers = [];
22
    	
22
    	
23
    	<?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) { 
-
 
24
            
-
 
25
            if (floatval($m['lat']) === 0.0 || floatval($m['long']) === 0.0) continue;
-
 
26
            
-
 
27
            ?>
24
    	var marker<?php echo $i; ?> = new google.maps.Marker({
28
    	var marker<?php echo $i; ?> = new google.maps.Marker({
25
			position: new google.maps.LatLng(<?php echo $m['lat']; ?>, <?php echo $m['long']; ?>),
29
			position: new google.maps.LatLng(<?php echo $m['lat']; ?>, <?php echo $m['long']; ?>),
26
			map: map
30
			map: map
27
    	} );    	
31
    	} );    	
28
    	markers.push(marker<?php echo $i; ?>);
32
    	markers.push(marker<?php echo $i; ?>);
29
 
33
 
30
    	google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
34
    	google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
31
			location.href = '<?php
35
			location.href = '<?php
32
			
36
			
33
				echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $m['customer']['id']]);
37
				echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $m['customer']['id']], [], true);
34
				
38
				
35
			?>';
39
			?>';
36
    	} );    	  
40
    	} );    	  
37
    	bounds.extend(marker<?php echo $i; ?>.getPosition());  	
41
    	bounds.extend(marker<?php echo $i; ?>.getPosition());  	
38
    	<?php $i ++; } ?>
42
    	<?php $i ++; } ?>
Line 50... Line 54...
50
 
54
 
51
/* ]]> */</script>
55
/* ]]> */</script>
52
 
56
 
53
<div style="" id="wpsg_mod_customermap_layer">
57
<div style="" id="wpsg_mod_customermap_layer">
54
	<div class="postbox" id="wpsg_modcustomermap">
58
	<div class="postbox" id="wpsg_modcustomermap">
55
		<div style="height:500px;">
59
		<div style="height:500px; width:500px;">
56
			<div style="width:100%; height:100%" id="wpsg_mod_statistics_map"></div>	
60
			<div style="width:100%; height:100%" id="wpsg_mod_statistics_map"></div>	
57
		</div>
61
		</div>
58
	</div>
62
	</div>
59
</div>
63
</div>
60
64