diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 282171276c..b82d9abc6f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-03-02 Pablo de la ConcepciĆ³n + + * include/functions_gis.php: Added a missing break and remove debugging + code. + + * operation/gis_maps/render_view.php: Added code to render Gmap type of + maps. + 2010-03-02 Miguel de Dios * include/functions_gis.php: disabled the use of night version of diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index 424e2dd861..b0ec23a064 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -121,7 +121,6 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas switch ($baselayer['gmap_type']) { case 'G_PHYSICAL_MAP': ?> - //var baseLayer = new OpenLayers.Layer.Google(); var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: G_PHYSICAL_MAP} @@ -131,7 +130,6 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas break; case 'G_HYBRID_MAP': ?> - alert("hibrid"); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: G_HYBRID_MAP, numZoomLevels: 20} @@ -141,7 +139,6 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas break; case 'G_SATELLITE_MAP': ?> - alert("satelite"); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: G_SATELLITE_MAP, numZoomLevels: 22} @@ -151,7 +148,6 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas break; default: ?> - alert("default"); var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {numZoomLevels: 20} @@ -160,7 +156,7 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas var baseLayer = new OpenLayers.Layer.Image( diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index 7722527d8f..77ec08911d 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -29,7 +29,8 @@ $map = get_db_row ('tgis_map', 'id_tgis_map', $idMap); $confMap = getMapConf($idMap); $num_baselayer=0; - +// Initialy there is no Gmap base layer. +$gmap_layer = false; if ($confMap !== false) { foreach ($confMap as $mapC) { $baselayers[$num_baselayer]['typeBaseLayer'] = $mapC['connection_type']; @@ -40,6 +41,13 @@ if ($confMap !== false) { case 'OSM': $baselayers[$num_baselayer]['url'] = $decodeJSON['url']; break; + case 'Gmap': + $baselayers[$num_baselayer]['gmap_type'] = $decodeJSON['gmap_type']; + $baselayers[$num_baselayer]['gmap_key'] = $decodeJSON['gmap_key']; + $gmap_key = $decodeJSON['gmap_key']; + // Onece a Gmap base layer is found we mark it to import the API + $gmap_layer = true; + break; case 'Static_Image': $baselayers[$num_baselayer]['url'] = $decodeJSON['url']; $baselayers[$num_baselayer]['bb_left'] = $decodeJSON['bb_left']; @@ -50,13 +58,19 @@ if ($confMap !== false) { $baselayers[$num_baselayer]['image_height'] = $decodeJSON['image_height']; break; } - $baselayers[$num_baselayer]['url'] = $decodeJSON['url']; $num_baselayer++; if ($mapC['default_map_connection'] == 1) { $numZoomLevels = $mapC['num_zoom_levels']; } } } +//debugPrint($gmap_layer); +//debugPrint($gmap_key); +if ($gmap_layer === true) { +?> + +