Ignore:
Timestamp:
03/16/2006 05:30:30 AM (6 years ago)
Author:
cirrus
Message:

Added: Custom maps support. Ability to enable/disable map types (e.g. satellite, hybrid, etc.). Closes #100
Bugfix: Fixed foreach array error. Closes #98
Change: Gearth now uses title_small for the filename.
Change: Gearth default zoom location now calculated from the config file min/max lon/lat options.
Change: Suggest search minor javascript change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/pages/gearth/gearth_download.php

    r157 r159  
    219219                        $xml .= "<kml xmlns='http://earth.google.com/kml/2.0'>\n"; 
    220220                        $xml .= "<Folder>\n"; 
    221                         $xml .= "<name>AWMN</name>\n"; 
     221                        $xml .= "<name>".$lang['title_small']."</name>\n"; 
    222222                        $xml .= "<open>1</open>\n"; 
    223223                        $xml .= "<description>".$lang['all_nodes']."</description>\n"; 
     
    228228                                $xml .= "<range>1600</range>\n"; 
    229229                        } else { 
    230                                 $xml .= "<longitude>23.763247</longitude>\n"; 
    231                                 $xml .= "<latitude>37.980869</latitude>\n"; 
     230                                $long = str_replace(",",".",($vars['gmap']['bounds']['max_longitude'] + $vars['gmap']['bounds']['min_longitude'])/2); 
     231                                $lat = str_replace(",",".",($vars['gmap']['bounds']['max_latitude'] + $vars['gmap']['bounds']['min_latitude'])/2); 
     232                                $xml .= "<longitude>".$long."</longitude>\n"; 
     233                                $xml .= "<latitude>".$lat."</latitude>\n"; 
    232234                                $xml .= "<range>40000</range>\n"; 
    233235                        } 
     
    351353 
    352354                        header("Expires: 0"); 
    353                         header("Content-Disposition: attachment; filename=awmn.kml"); 
     355                        header("Content-Disposition: attachment; filename=".$lang['title_small'].".kml"); 
    354356                        header("Content-type: application/vnd.google-earth.kml; charset=".$lang['charset']); 
    355357                        echo $xml; 
Note: See TracChangeset for help on using the changeset viewer.