|
|
1 |
<?php if(!empty($this->config['google_maps_api_key'])):?> |
|
|
2 |
|
|
|
3 |
<div class="owa_map-container"> |
|
|
4 |
<img align="bottom" src="<?php echo $this->makeImageLink('kml_feed_small.png');?>"> <a class="owa_map-type-control" maptype="earth" href="#">View in Google Earth</a><BR><BR> |
|
|
5 |
<div id="map" class="jmap" style="width: 100%; height: 500px"></div> |
|
|
6 |
</div> |
|
|
7 |
<script> |
|
|
8 |
|
|
|
9 |
OWA.items['map'] = new OWA.map(); |
|
|
10 |
OWA.items['map'].dom_id = 'map'; |
|
|
11 |
<?php foreach($latest_visits->resultsRows as $k => $visit): ?> |
|
|
12 |
<?php if (!empty($visit['host_longitude'])):?> |
|
|
13 |
OWA.items['map'].markers[<?php echo $k;?>] = {pointLatLng: [<?php echo trim($visit['host_latitude']);?>, <?php echo trim($visit['host_longitude']);?>], pointHTML: '<?php echo preg_replace("/[\n\r]/", '', $this->subTemplate('report_visit_summary_balloon.tpl', array('visit' => $visit)));?>'}; |
|
|
14 |
<?php endif;?> |
|
|
15 |
<?php endforeach;?> |
|
|
16 |
OWA.items['map'].placeMarkers(); |
|
|
17 |
|
|
|
18 |
</script> |
|
|
19 |
|
|
|
20 |
<?php else:?> |
|
|
21 |
|
|
|
22 |
<div class="error"> |
|
|
23 |
You must have a Google Maps API Key to use this feature. Google provides this key for free at <a href="http://www.google.com/apis/maps/signup.html" target="_blank">this Google web site</a>. Once you obtain a key enter in on the <a href="<?php echo $this->makeLink(array('do' => 'base.sitesProfile', 'site_id' => $site_id));?>">profile page for this tracked web site</a>. |
|
|
24 |
</div> |
|
|
25 |
|
|
|
26 |
<?php endif;?> |
|
|
27 |
|
|
|
28 |
|