diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 18ee68938d..b4002aa7a3 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-02-25 Pablo de la ConcepciĆ³n + + * godmode/setup/gis_step_2.php: Modified to get the KEY to load the Google + Maps Javascript for the used domain. Now it stores the key, but still it + doesn't load dinamicaly the javascript to show the preview. + 2010-02-24 Miguel de Dios * include/functions_gis.php: fix map to show correct position the agent diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index e1239d60eb..4fb3eb1b53 100755 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -100,7 +100,10 @@ switch ($action) { case 'Gmap': $mapConnection_Gmap_url= get_parameter('url'); $gmap_type= get_parameter('gmap_type'); - $mapConnectionData = array('type' => 'Gmap', 'gmap_type' => $gmap_type); + $gmap_key= get_parameter('gmap_key'); + $mapConnectionData = array('type' => 'Gmap', + 'gmap_type' => $gmap_type, + 'gmap_key' => $gmap_key); break; case 'Static_Image': $mapConnection_Image_url= get_parameter('url'); @@ -183,6 +186,7 @@ if ($mapConnectionData != null) { break; case 'Gmap': $gmap_type = $mapConnectionData['gmap_type']; + $gmap_key = $mapConnectionData['gmap_key']; break; case 'Static_Image': $mapConnectionDataUrl = $mapConnectionData['url']; @@ -207,12 +211,18 @@ $optionsConnectionOSMTable = '' . '' . '' . '' . + '' . + '' . + '' . + '' . + '' . + '' . '
' . __("Google Map Type") . ':'.trim(print_select($gmaps_types,'gmap_type', $gmap_type, "", '', 0, true)) . '
' . __("Google Maps Key") . ':
' . print_input_text ('gmap_key', $gmap_key, '', 90, 128, true) . '
'; // Image Map Connection $optionsConnectionImageTable = '' . @@ -418,12 +428,14 @@ function selMapConnectionType() { $('#form_map_connection_type').html('').hide(); break; case 'Gmap': - /* + /* TODO: still testing this part... still need to use the provided key var script = document.createElement("script"); script.type = "text/javascript"; script.src = 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'; - script.src = 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'; - document.body.appendChild(script); + //script.src = 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'; + //document.body.appendChild(script); + //document.getElementsByTagName("head")[0].appendChild(script); + $('head').append(script); */ $('#form_map_connection_type').html('').hide(); break;