/** * Gives the body map-info and point-list part for the map front end presentation * * @param int $p_articleNumber * @param int $p_languageId * * @return array */ public static function GetMapTagListData($p_articleNumber, $p_languageId) { $f_article_number = (int) $p_articleNumber; $f_language_id = (int) $p_languageId; $map_suffix = '_' . $f_article_number . '_' . $f_language_id; $map_id = Geo_Map::GetMapIdByArticle($f_article_number); $preview = true; $text_only = true; $poi_info = Geo_Map::LoadMapData($map_id, $f_language_id, $f_article_number, $preview, $text_only); $pind = 0; foreach ($poi_info['pois'] as $rank => $poi) { $cur_lon = $poi['longitude']; $cur_lat = $poi['latitude']; $center_poi = "if (window.map_prepared) {geo_object{$map_suffix}.center_lonlat({$cur_lon}, {$cur_lat});} point_large_map_center" . $map_suffix . "({$pind}, false);"; $select_poi = "if (window.map_prepared) {geo_object{$map_suffix}.select_poi({$pind});} point_large_map_center" . $map_suffix . "({$pind}, true);"; $poi_info['pois'][$rank]['center'] = $center_poi; $poi_info['pois'][$rank]['open'] = $select_poi; $pind += 1; } return (array) $poi_info; }
/** * Gives the body map-info and point-list part for the map front end presentation * * @param int $p_articleNumber * @param int $p_languageId * * @return array */ public static function GetMapTagListData($p_articleNumber, $p_languageId) { $f_article_number = (int) $p_articleNumber; $f_language_id = (int) $p_languageId; $map_suffix = "_" . $f_article_number . "_" . $f_language_id; $map_id = Geo_Map::GetMapIdByArticle($f_article_number); $preview = true; $text_only = true; $poi_info = Geo_Map::LoadMapData($map_id, $f_language_id, $f_article_number, $preview, $text_only); $pind = 0; foreach ($poi_info["pois"] as $rank => $poi) { $cur_lon = $poi["longitude"]; $cur_lat = $poi["latitude"]; $center = "geo_object$map_suffix.center_lonlat($cur_lon, $cur_lat);"; $poi_info["pois"][$rank]["center"] = $center; $poi_info["pois"][$rank]["open"] = "geo_hook_on_map_feature_select(geo_object$map_suffix, $pind);"; $pind += 1; } return (array) $poi_info; } // fn GetMapTagListData