2010-02-24 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php: in function "printMap" add the posibility to show the Static_Image base layer (WIP because it'snt show the icons), in function "getAgentMap" pass the status in the feature. * include/javascript/openlayers.pandora.js: in the function "js_printMap" add the posibility to show the Static_Image base layer (WIP). * operation/gis_maps/render_view.php: clean source code for the part of baselayers and add the code for Static Image baselayer. * godmode/setup/gis_step_2.php: clean source code uninitialize vars, add the preview static image var (WIP because it'snt show the icons). git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2414 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1f1b8b5516
commit
b3e4b9c000
|
@ -1,3 +1,18 @@
|
|||
2010-02-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_gis.php: in function "printMap" add the posibility to
|
||||
show the Static_Image base layer (WIP because it'snt show the icons), in
|
||||
function "getAgentMap" pass the status in the feature.
|
||||
|
||||
* include/javascript/openlayers.pandora.js: in the function "js_printMap"
|
||||
add the posibility to show the Static_Image base layer (WIP).
|
||||
|
||||
* operation/gis_maps/render_view.php: clean source code for the part of
|
||||
baselayers and add the code for Static Image baselayer.
|
||||
|
||||
* godmode/setup/gis_step_2.php: clean source code uninitialize vars, add
|
||||
the preview static image var (WIP because it'snt show the icons).
|
||||
|
||||
2010-02-24 Pablo de la Concepción <pablo.concepcion@artica.es>
|
||||
|
||||
* godmode/setup/gis_step_2.php: Modified to be able to manage also
|
||||
|
|
|
@ -169,6 +169,13 @@ print_table ($table);
|
|||
|
||||
$optionsConnectionTypeTable = '';
|
||||
$mapConnectionDataUrl = '';
|
||||
$gmap_type = '';
|
||||
$bb_left = '';
|
||||
$bb_right = '';
|
||||
$bb_bottom = '';
|
||||
$bb_top = '';
|
||||
$image_width = '';
|
||||
$image_height = '';
|
||||
if ($mapConnectionData != null) {
|
||||
switch ($mapConnection_type) {
|
||||
case 'OSM':
|
||||
|
@ -380,6 +387,14 @@ function refreshMapView() {
|
|||
objBaseLayers[0]['name'] = $('input[name=name]').val();
|
||||
objBaseLayers[0]['url'] = $('input[name=url]').val();
|
||||
|
||||
//objBaseLayers[0]['gmap_type = '';
|
||||
objBaseLayers[0]['bb_left'] = $('input[name=bb_left]').val();
|
||||
objBaseLayers[0]['bb_right'] = $('input[name=bb_right]').val();
|
||||
objBaseLayers[0]['bb_bottom'] = $('input[name=bb_bottom]').val();
|
||||
objBaseLayers[0]['bb_top'] = $('input[name=bb_top]').val();
|
||||
objBaseLayers[0]['image_width'] = $('input[name=image_width]').val();
|
||||
objBaseLayers[0]['image_height'] = $('input[name=image_height]').val();
|
||||
|
||||
arrayControls = null;
|
||||
arrayControls = Array('Navigation', 'PanZoom', 'MousePosition');
|
||||
|
||||
|
|
|
@ -88,10 +88,25 @@ function printMap($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $bas
|
|||
switch ($baselayer['typeBaseLayer']) {
|
||||
case 'OSM':
|
||||
?>
|
||||
var baseLayer = new OpenLayers.Layer.OSM("<?php echo $baselayer['name']; ?>", "<?php echo $baselayer['url']; ?>", {numZoomLevels: <?php echo $numLevelZooms; ?>});
|
||||
var baseLayer = new OpenLayers.Layer.OSM("<?php echo $baselayer['name']; ?>",
|
||||
"<?php echo $baselayer['url']; ?>", {numZoomLevels: <?php echo $numLevelZooms; ?>});
|
||||
map.addLayer(baseLayer);
|
||||
<?php
|
||||
break;
|
||||
case 'Static_Image':
|
||||
?>
|
||||
var baseLayer = new OpenLayers.Layer.Image(
|
||||
"<?php echo $baselayer['name']; ?>",
|
||||
"<?php echo $baselayer['url']; ?>",
|
||||
new OpenLayers.Bounds(<?php echo $baselayer['bb_left']; ?>,
|
||||
<?php echo $baselayer['bb_bottom']; ?>,
|
||||
<?php echo $baselayer['bb_right']; ?>,
|
||||
<?php echo $baselayer['bb_top']; ?>),
|
||||
new OpenLayers.Size(<?php echo $baselayer['image_width']; ?>, <?php echo $baselayer['image_height']; ?>),
|
||||
{numZoomLevels: <?php echo $numLevelZooms; ?>});
|
||||
map.addLayer(baseLayer);
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -744,6 +759,7 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerI
|
|||
makeLayer("layer_for_agent_".$agent_name);
|
||||
|
||||
$agent_icon = get_agent_icon_map($agent_id, true);
|
||||
$status = get_agent_status($agent_id);
|
||||
|
||||
/* If show_history is true, show the path of the agent */
|
||||
if ($show_history) {
|
||||
|
@ -751,7 +767,7 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerI
|
|||
addPath("layer_for_agent_".$agent_name,$agent_id);
|
||||
}
|
||||
|
||||
addPoint("layer_for_agent_".$agent_name, $agent_name, $agentPositionLatitude, $agentPositionLongitude, $agent_icon, 20, 20, $agent_id, 'point_agent_info');
|
||||
addPoint("layer_for_agent_".$agent_name, $agent_name, $agentPositionLatitude, $agentPositionLongitude, $agent_icon, 20, 20, $agent_id, $status, 'point_agent_info');
|
||||
|
||||
if ($centerInAgent) {
|
||||
?>
|
||||
|
|
|
@ -81,6 +81,20 @@ function js_printMap(id_div, initial_zoom, num_levels_zoom, center_latitude, cen
|
|||
objBaseLayers[baselayerIndex]['url'], {numZoomLevels: num_levels_zoom});
|
||||
map.addLayer(baseLayer);
|
||||
break;
|
||||
case 'Static_Image':
|
||||
console.log(objBaseLayers);
|
||||
|
||||
var baseLayer = new OpenLayers.Layer.Image(
|
||||
objBaseLayers[baselayerIndex]['name'],
|
||||
objBaseLayers[baselayerIndex]['url'],
|
||||
new OpenLayers.Bounds(objBaseLayers[baselayerIndex]['bb_left'],
|
||||
objBaseLayers[baselayerIndex]['bb_bottom'],
|
||||
objBaseLayers[baselayerIndex]['bb_right'],
|
||||
objBaseLayers[baselayerIndex]['bb_top']),
|
||||
new OpenLayers.Size(objBaseLayers[baselayerIndex]['image_width'], objBaseLayers[baselayerIndex]['image_height']),
|
||||
{numZoomLevels: num_levels_zoom});
|
||||
map.addLayer(baseLayer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,21 @@ if ($confMap !== false) {
|
|||
$baselayers[$num_baselayer]['typeBaseLayer'] = $mapC['connection_type'];
|
||||
$baselayers[$num_baselayer]['name'] = $mapC['conection_name'];
|
||||
$decodeJSON = json_decode($mapC['conection_data'], true);
|
||||
|
||||
switch ($mapC['connection_type']) {
|
||||
case 'OSM':
|
||||
$baselayers[$num_baselayer]['url'] = $decodeJSON['url'];
|
||||
break;
|
||||
case 'Static_Image':
|
||||
$baselayers[$num_baselayer]['url'] = $decodeJSON['url'];
|
||||
$baselayers[$num_baselayer]['bb_left'] = $decodeJSON['bb_left'];
|
||||
$baselayers[$num_baselayer]['bb_right'] = $decodeJSON['bb_right'];
|
||||
$baselayers[$num_baselayer]['bb_bottom'] = $decodeJSON['bb_bottom'];
|
||||
$baselayers[$num_baselayer]['bb_top'] = $decodeJSON['bb_top'];
|
||||
$baselayers[$num_baselayer]['image_width'] = $decodeJSON['image_width'];
|
||||
$baselayers[$num_baselayer]['image_height'] = $decodeJSON['image_height'];
|
||||
break;
|
||||
}
|
||||
$baselayers[$num_baselayer]['url'] = $decodeJSON['url'];
|
||||
$num_baselayer++;
|
||||
if ($mapC['default_map_connection'] == 1) {
|
||||
|
|
Loading…
Reference in New Issue