|
Multiple Site KeysAllow multiple domain name references to the same map.
--- gma-2.2.0-pre2.php.ORIG Thu Feb 1 11:24:05 2007
+++ gma-2.2.0-pre2.php Thu Feb 1 11:26:52 2007
@@ -212,11 +212,12 @@
}
function gmaAddressLookup($a) {
global $GmaKey;
+ $_gmakey = $GmaKey[$_SERVER['HTTP_HOST']];
$res = false;
$url = sprintf(
'http://maps.google.com/maps/geo?&q=%s&output=csv&key=%s',
rawurlencode($a),
- $GmaKey
+ $_gmakey
);
$coords = array();
if($res = file_get_contents($url)) {
@@ -231,12 +232,13 @@
global $GmaEnable, $GmaVersion, $GmaScript;
global $GmaMaps, $GmaPoints, $GmaLines;
global $GmaKey, $GmaDebugMsg, $GmaDefaults;
+ $_gmakey = $GmaKey[$_SERVER['HTTP_HOST']];
GmaDoIEFix();
$HTMLHeaderFmt[]
= '<style type=\'text/css\'>v:* { behavior:url(#default#VML); }</style>'
."\n<script src='http://maps.google.com/maps?file=api&v=2&key="
- .$GmaKey."' type='text/javascript'></script>";
+ .$_gmakey."' type='text/javascript'></script>";
$HTMLHeaderFmt[]
= "\n<script language='javascript' src='\$FarmPubDirUrl/scripts/gmaJs.js'
>"
."</script>\n";
Usage: in config.php, change
Status:Planned Version:2.2 |