Example #1
0
<?php

require 'includes/SasktelCache.php';
require 'includes/SasktelFetcher.php';
require 'includes/SasktelParser.php';
$fetcher = new SasktelFetcher();
$parser = new SasktelParser($fetcher->getDOMInstance());
?>
<html>
<head>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
	<script type="text/javascript">google.load('jquery','1.4.2');</script>
    <script type="text/javascript" src="http://maps.google.com?file=api&amp;v=2.x&amp;key=<?php 
echo SasktelFetcher::$google_key;
?>
"></script>
    <script type="text/javascript" src="js/currently_3g.js"></script>
    <script type="text/javascript" src="js/non_3g.js"></script>
</head>
<body>
        
    <div id="map_canvas" style="width:600px;height:800px;"></div>
    <script type="text/javascript" src="js/SasktelMap.js"></script>
    <script type="text/javascript">
        $(function(){
            SasktelMap.init();
        });
    </script>
</body>
</html>
Example #2
0
 /**
  * Create and return an array of all the data we need to store in 
  * the cached js file 
  *
  * @param String $city The city name to make the google query with
  * @param String $date The date (optional: if it's a non 3g location)
  */
 protected static function _createCityDataArray($city, $date = '')
 {
     $city = self::normalizeCity($city);
     if ($date) {
         $date = self::normalizeDate($date);
     }
     $data = SasktelFetcher::queryGoogle($city);
     $coords = $data['content']['Placemark'][0]['Point']['coordinates'];
     $lat = $coords[1];
     $lon = $coords[0];
     $ret = array('city' => $city, 'lat' => $lat, 'lon' => $lon);
     if ($date) {
         $ret['date'] = $date;
     }
     return $ret;
 }