Answer the question
In order to leave comments, you need to log in
Why is the Yandex map not displayed, only its coordinates?
Hello. I'm trying to extract an element from the infoblock with the property of binding to the Yandex map.
<?
$selected_min_id = empty($_SESSION["city"]) ? 25 : $_SESSION["city"];
$rsMin = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 10, "ACTIVE" => "Y",
"ID" => $selected_city_id), false, false, array("ID", "PROPERTY_MAP"));
if ($arMin = $rsMin->GetNext()) {
} else {
$rsMin = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 10, "ACTIVE" => "Y",
"ID" => 25), false, false, array("ID", "PROPERTY_MAP"));
$arMin= $rsMin->GetNext();
}
$map = $arCity["PROPERTY_MAP_VALUE"];
?>
<?=$map?>
Answer the question
In order to leave comments, you need to log in
You coordinates and read. They still need to be fed to the map, initialized via javascript.
There is an example here:
web-finder.ru/otobrazhenie-yandeks-kart-v-bitriks
You have a code that in some situations will make two queries to the database.
I would pass an array to the selection filter in the "ID" key:
"ID" => array(
25, $selected_min_id
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question