Changeset 7723 for trunk/src/map/index.php
- Timestamp:
- Apr 12, 2010, 7:15:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/map/index.php
r7722 r7723 1 1 <?php require_once("inc/kmlHandler.php"); ?> 2 <?php include("../config.php"); 3 4 # Key is defined to be the domain name if exists 5 $apikey = $config['googlekey']['default']; 6 $servername = $_SERVER['SERVER_NAME']; 7 8 # Little hack, does not work with foo.co.uk domains 9 $servername = implode('.',array_slice(explode('.',$servername),-2)); 10 if (array_key_exists($servername,$config['googlekey'])) { 11 $apikey = $config['googlekey'][$servername]; 12 } 13 ?> 2 14 3 15 <html> … … 17 29 18 30 <!-- Loading in the google-api --> 19 <script src="http://maps.google.com/maps?file=api&v=2&key= ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script>31 <script src="http://maps.google.com/maps?file=api&v=2&key=<?=$apikey;?>" type="text/javascript"></script> 20 32 <!-- Loading in the javascript that will add the map into #mapcanvas --> 21 33 <script type="text/javascript" src="inc/nodemapWL.js"></script>
Note:
See TracChangeset
for help on using the changeset viewer.