Subversion Repositories wpShopGermany4

Rev

Rev 5866 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2683 daniel 1
<?php
2
 
3
	/**
5866 hartmut 4
	 * Template f�r die Anzeige der Kundenkarte innerhalb des Statistikmoduls
2683 daniel 5
	 */
6
 
7
?>
8
<script type="text/javascript">/* <![CDATA[ */
9
 
10
	function wpsg_mod_statistics_initialize()
11
	{
12
 
13
    	var mapOptions = {
14
      		center: new google.maps.LatLng(-34.397, 150.644),
15
      		zoom: 5,
16
      		mapTypeId: google.maps.MapTypeId.ROADMAP
17
    	};
18
 
19
    	var map = new google.maps.Map(document.getElementById("wpsg_mod_statistics_map"), mapOptions);
20
    	var bounds = new google.maps.LatLngBounds();
5866 hartmut 21
    	var markers = [];
22
 
2683 daniel 23
    	<?php $i = 1; foreach ($this->view['wpsg_mod_statistics']['marker'] as $m) { ?>
24
    	var marker<?php echo $i; ?> = new google.maps.Marker({
5866 hartmut 25
			position: new google.maps.LatLng(<?php echo $m['lat']; ?>, <?php echo $m['long']; ?>),
2683 daniel 26
			map: map
27
    	} );
5866 hartmut 28
    	markers.push(marker<?php echo $i; ?>);
29
 
2683 daniel 30
    	google.maps.event.addListener(marker<?php echo $i; ?>, 'click', function() {
7612 daniel 31
			location.href = '<?php
32
 
33
				echo wpsg_admin_url('Customer', 'edit', ['edit_id' => $m['customer']['id']]);
34
 
35
			?>';
2683 daniel 36
    	} );
37
    	bounds.extend(marker<?php echo $i; ?>.getPosition());
38
    	<?php $i ++; } ?>
39
 
40
    	map.fitBounds(bounds);
41
    	map.setZoom(15);
5866 hartmut 42
 
43
        var markerCluster = new MarkerClusterer(map, markers,
44
                {imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
45
 
2683 daniel 46
 
47
  	} // function wpsg_mod_statistics_initialize()
48
 
49
	google.maps.event.addDomListener(window, 'load', wpsg_mod_statistics_initialize);
50
 
51
/* ]]> */</script>
52
 
53
<div style="" id="wpsg_mod_customermap_layer">
54
	<div class="postbox" id="wpsg_modcustomermap">
55
		<div style="height:500px;">
56
			<div style="width:100%; height:100%" id="wpsg_mod_statistics_map"></div>
57
		</div>
58
	</div>
59
</div>