0) return true; return false; } function cl_meta_make_map_picture_url($params) { global $conf; if ( empty($conf['gmaps_api_key']) and $_SERVER['SERVER_ADDR']!='127.0.0.1' ) return ""; $map_url = make_picture_url($params); return add_url_params($map_url, array('map'=>null) ); } function cl_meta_duplicate_map_picture_url() { global $conf; if ( empty($conf['gmaps_api_key']) and $_SERVER['SERVER_ADDR']!='127.0.0.1' ) return ""; $map_url = duplicate_picture_url(); return add_url_params($map_url, array('map'=>null) ); } function cl_meta_make_map_index_url($params=array()) { global $conf, $cl_meta_dir; if ( empty($conf['gmaps_api_key']) and $_SERVER['SERVER_ADDR']!='127.0.0.1' ) return ""; $url = get_root_url().'map'; if ($conf['php_extension_in_urls']) $url .= '.php'; if ($conf['question_mark_in_urls']) $url .= '?'; $url .= make_section_in_url($params); $url = add_well_known_params_in_url($url, array_intersect_key($params, array('flat'=>1) ) ); return $url; } function cl_meta_duplicate_map_index_url($redefined=array(), $removed=array()) { return cl_meta_make_map_index_url( params_for_duplication($redefined, $removed) ); } function cl_meta_duplicate_kml_index_url($redefined=array(), $removed=array()) { return cl_meta_make_kml_index_url( params_for_duplication($redefined, $removed) ); } function cl_meta_make_kml_index_url($params) { global $conf, $cl_meta_dir; $url = get_root_url().'plugins/'.$cl_meta_dir.'/kml.php'; if ($conf['question_mark_in_urls']) $url .= '?'; $url .= make_section_in_url($params); unset( $params['start'] ); if ( 'categories'!=$params['section']) unset( $params['flat'] ); $url = add_well_known_params_in_url($url, $params); $get_params = array(); if ( isset($params['box']) and !empty($params['box']) ) { include_once( dirname(__FILE__).'/functions_map.php' ); if ( ! bounds_is_world($params['box']) ) $get_params['box'] = bounds_to_url($params['box']); } if ( isset($params['ll']) and !empty($params['ll']) ) $get_params['ll'] = $params['ll']['lat'].','.$params['ll']['lon']; $url = add_url_params($url, $get_params ); return $url; } ?>