$themeTree=unserialize($_COOKIE[$themeTreeId]); } $layersChecked=array(); if (isset($_COOKIE['layersChecked'])) { $layersChecked=explode(":", $_COOKIE['layersChecked']); } $source=$_REQUEST['root']; $result=getTheme($theme_type, $themeTree, $source); print $result; break; case 'legend': require_once("category.php"); if (isset($_REQUEST['legend'])) { $legendlayer=$_REQUEST['legend']; print getLayerIconUrl($legendlayer); } break; // category.php ends //MultiLayerSearch.php starts case 'searchByFeature': require_once("MultiLayerSearch.php"); $feature_ids=""; $searchDist=""; $layers_list=""; if (isset($_REQUEST['featureids'])) { $feature_ids=$_REQUEST['featureids']; } else { die(return_error('Required parameters are not set'));
function formLayersListXML($xmlDoc, &$rootNode, $layer_tablename, $layer_name, $access, $p_nid, $participation_type) { $imgPath = base_path() . path_to_theme().'/images/icons/'; $layertype = ''; /* get the layer type */ $query = 'select layer_type from "Meta_Layer" where layer_tablename= \'%s\''; $result = db_query($query, $layer_tablename); while($row = db_fetch_object($result)) { $layertype = $row->layer_type; } $attribs = array(); $attribs['layer_tablename'] = $layer_tablename; $attribs['layer_name'] = $layer_name; $attribs['icon'] = getLayerIconUrl($layer_tablename); $layersChecked = explode(":", $_COOKIE['layersChecked']); if (in_array($layer_tablename, $layersChecked)) { $attribs['checked'] = 1; } else { $attribs['checked'] = 0; } $lyrNode = addXMLChildNode($xmlDoc, $rootNode, "layer", null, $attribs); $toolsNode = addXMLChildNode($xmlDoc, $lyrNode, "tools"); addTool($xmlDoc, $toolsNode, 'information', $imgPath .'information.png', $layer_name . ' Information', 'getLayerMetadata', array($layer_tablename)); if ($participation_type > 0) { addTool($xmlDoc, $toolsNode, 'participate', $imgPath .'participate.png', 'Participation Info for ' . $layer_name, 'showParticipationInfo', array($layer_tablename, $p_nid)); } if($access) { addTool($xmlDoc, $toolsNode, 'download', $imgPath .'download-layertree.png', 'Download ' . $layer_name, 'getDownloadFormats', array($layer_tablename)); } addTool($xmlDoc, $toolsNode, 'ZTE', $imgPath .'zoom-to-extent.png', 'Zoom to layer extent', 'zoomToExtent', array(getLayerExtent($layer_tablename,$layertype))); }