Яндекс карта
<script type="text/javascript">
function BX_SetPlacemarks_MAP_YANDEX_VIEW_4_71_689940550(map)
{
if(typeof window["BX_YMapAddPlacemark"] != 'function')
{
/* If component's result was cached as html,
* script.js will not been loaded next time.
* let's do it manualy.
*/
(function(d, s, id)
{
var js, bx_ym = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "/bitrix/components/bitrix/map.yandex.view/templates/.default/script.js";
bx_ym.parentNode.insertBefore(js, bx_ym);
}(document, 'script', 'bx-ya-map-js'));
var ymWaitIntervalId = setInterval( function(){
if(typeof window["BX_YMapAddPlacemark"] == 'function')
{
BX_SetPlacemarks_MAP_YANDEX_VIEW_4_71_689940550(map);
clearInterval(ymWaitIntervalId);
}
}, 300
);
return;
}
var arObjects = {PLACEMARKS:[],POLYLINES:[]};
arObjects.PLACEMARKS[arObjects.PLACEMARKS.length] = BX_YMapAddPlacemark(map, {'LON':'131.88270456558','LAT':'43.116901375544','TEXT':''});
}
</script>
<div class="bx-yandex-view-layout">
<div class="bx-yandex-view-map">
<script type="text/javascript">
if (!window.GLOBAL_arMapObjects)
window.GLOBAL_arMapObjects = {};
function init_MAP_YANDEX_VIEW_4_71_689940550()
{
if (!window.ymaps)
return;
if(typeof window.GLOBAL_arMapObjects['MAP_YANDEX_VIEW_4_71_689940550'] !== "undefined")
return;
var node = BX("BX_YMAP_MAP_YANDEX_VIEW_4_71_689940550");
node.innerHTML = '';
var map = window.GLOBAL_arMapObjects['MAP_YANDEX_VIEW_4_71_689940550'] = new ymaps.Map(node, {
center: [43.116901375544, 131.88270456558],
zoom: 10,
type: 'yandex#map'
});
map.behaviors.enable("scrollZoom");
map.behaviors.enable("dblClickZoom");
map.behaviors.enable("drag");
if (map.behaviors.isEnabled("rightMouseButtonMagnifier"))
map.behaviors.disable("rightMouseButtonMagnifier");
map.controls.add('zoomControl');
map.controls.add('miniMap');
map.controls.add('typeSelector');
map.controls.add('scaleLine');
window.bYandexMapScriptsLoaded = true;
if (window.BX_SetPlacemarks_MAP_YANDEX_VIEW_4_71_689940550)
{
window.BX_SetPlacemarks_MAP_YANDEX_VIEW_4_71_689940550(map);
}
}
function BXMapLoader_MAP_YANDEX_VIEW_4_71_689940550()
{
if (null == window.bYandexMapScriptsLoaded)
{
function _wait_for_map(){
if (window.ymaps && window.ymaps.Map)
init_MAP_YANDEX_VIEW_4_71_689940550();
else
setTimeout(_wait_for_map, 50);
}
BX.loadScript('https://api-maps.yandex.ru/2.0/?load=package.full&mode=release&lang=ru-RU&wizard=bitrix', _wait_for_map);
}
else
{
init_MAP_YANDEX_VIEW_4_71_689940550();
}
}
BX.ready(BXMapLoader_MAP_YANDEX_VIEW_4_71_689940550);
/* if map inits in hidden block (display:none)
* after the block showed
* for properly showing map this function must be called
*/
function BXMapYandexAfterShow(mapId)
{
if(window.GLOBAL_arMapObjects[mapId] !== undefined)
window.GLOBAL_arMapObjects[mapId].container.fitToViewport();
}
</script>
<div id="BX_YMAP_MAP_YANDEX_VIEW_4_71_689940550" class="bx-yandex-map" style="height: 500px; width: 600px;">загрузка карты...</div> </div>
</div>