2010-05-12 Sergio Martin <sergio.martin@artica.es>

* include/functions_gis.php: Fixed the maps of
	type Googlemaps in agent view for bug: 2993745



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2704 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2010-05-12 08:52:25 +00:00
parent a3f9182282
commit a79e2585e8
2 changed files with 37 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-05-12 Sergio Martin <sergio.martin@artica.es>
* include/functions_gis.php: Fixed the maps of
type Googlemaps in agent view for bug: 2993745
2010-05-11 Ramon Novoa <rnovoa@artica.es>
* operation/agentes/stat_win.php: Pass the start date to min, max and

View File

@ -817,12 +817,41 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerI
$agent_name = get_agent_name($agent_id);
$conectionData = json_decode($defaultMap['conection_data'], true);
$baselayers[0]['url'] = $conectionData['url'];
$baselayers[0]['name'] = $defaultMap['conection_name'];
$baselayers[0]['typeBaseLayer'] = $conectionData['type'];
$baselayers[0]['num_zoom_levels'] = $defaultMap['num_zoom_levels'];
$conectionData = json_decode($defaultMap['conection_data'], true);
$baselayers[0]['typeBaseLayer'] = $conectionData['type'];
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition');
$gmap_layer = false;
switch ($conectionData['type']) {
case 'OSM':
$baselayers[0]['url'] = $conectionData['url'];
break;
case 'Gmap':
$baselayers[0]['gmap_type'] = $conectionData['gmap_type'];
$baselayers[0]['gmap_key'] = $conectionData['gmap_key'];
$gmap_key = $conectionData['gmap_key'];
// Onece a Gmap base layer is found we mark it to import the API
$gmap_layer = true;
break;
case 'Static_Image':
$baselayers[0]['url'] = $conectionData['url'];
$baselayers[0]['bb_left'] = $conectionData['bb_left'];
$baselayers[0]['bb_right'] = $conectionData['bb_right'];
$baselayers[0]['bb_bottom'] = $conectionData['bb_bottom'];
$baselayers[0]['bb_top'] = $conectionData['bb_top'];
$baselayers[0]['image_width'] = $conectionData['image_width'];
$baselayers[0]['image_height'] = $conectionData['image_height'];
break;
}
if ($gmap_layer === true) {
?>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=<?php echo $gmap_key ?>" ></script>
<?php
}
printMap($agent_name."_agent_map", $defaultMap['zoom_level'],
$defaultMap['initial_latitude'],