Changeset 178 for trunk/globals


Ignore:
Timestamp:
09/21/2008 12:18:10 AM (3 years ago)
Author:
winner
Message:

Fix: choosing from config file the enabled google map types.
Add: psysical google map type.
Add: google maps localization.
Fix: reduce IE memory leaks from google maps (GUnload function).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/globals/functions.php

    r172 r178  
    337337 
    338338function include_gmap($javascript) { 
    339         global $main, $vars; 
     339        global $main, $vars, $lang; 
    340340        $dirname = dirname($_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']); 
    341341        $gmap_key = $vars['gmap']['keys'][$dirname]; 
     
    345345        if ($gmap_key == '') return FALSE; 
    346346 
    347         $main->html->head->add_script("text/javascript", "http://".$vars['gmap']['server']."/maps?file=api&v=".$vars['gmap']['api']."&key=".$gmap_key); 
     347        $main->html->head->add_script("text/javascript", "http://".$vars['gmap']['server']."/maps?file=api&v=".$vars['gmap']['api']."&key=".$gmap_key."&hl=".$lang["iso639"]); 
    348348        $main->html->head->add_script("text/javascript", $javascript); 
    349349        $main->html->head->add_extra( 
     
    355355         
    356356        $main->html->body->tags['onload'] = "gmap_onload()";     
     357    $main->html->body->tags['onunload'] = "GUnload()"; //added to reduce IE memory leaks 
    357358        return TRUE; 
    358359} 
Note: See TracChangeset for help on using the changeset viewer.