[Mapbender-commits] r3997 - branches/google_dev/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jun 4 06:10:58 EDT 2009


Author: christoph
Date: 2009-06-04 06:10:58 -0400 (Thu, 04 Jun 2009)
New Revision: 3997

Modified:
   branches/google_dev/http/javascripts/mod_google.php
Log:


Modified: branches/google_dev/http/javascripts/mod_google.php
===================================================================
--- branches/google_dev/http/javascripts/mod_google.php	2009-06-04 08:36:31 UTC (rev 3996)
+++ branches/google_dev/http/javascripts/mod_google.php	2009-06-04 10:10:58 UTC (rev 3997)
@@ -18,6 +18,8 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_connector.php");
+
 echo "var mod_google_target = '".$e_target[0]."';";
 
 require(dirname(__FILE__)."/../include/dyn_php.php");
@@ -25,11 +27,19 @@
 if (!$key) {
 	$e = new mb_exception("No key given for Google Maps API. Google Maps will not be available.");
 }
+else {
+	$mapsApiUrl = "http://maps.google.com/maps/api/js?sensor=false&key=" . $key;
 
+	$con = new connector($mapsApiUrl);
+	if ($con->file) {
+		echo $con->file;
+	}
+	else {
+		$e = new mb_exception("Could not load Google Maps API. Google Maps will not be available.");
+	}
+	
+}
 
-$mapsApiUrl = "http://maps.google.com/maps/api/js?sensor=false&key=" . $key;
-
-readfile($mapsApiUrl);
 ?>
 
 mb_mapObj_const.prototype.zoomToLevel = function (currentZoomLevel) {



More information about the Mapbender_commits mailing list