- Timestamp:
- Apr 12, 2010, 7:15:57 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/config.php
r7702 r7723 36 36 $config['require'][] = $config['folder_class'] . 'KMLFile.class.php'; 37 37 $config['require'][] = $config['folder_class'] . 'KMLPlacemark.class.php'; 38 39 $config['googlekey'] = array(); 40 $config['googlekey']['wirelessleiden.nl'] = 'ABQIAAAAKRiFs2kXKhTkKZkE_ms9rhTdBXm62xfhQU7Dk6ZBFSzYdmSteRQWjLqZhwX8afHvGpd4N3iKql6w8g'; 41 $config['googlekey']['default'] = 'ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA'; 38 42 ?> -
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.