На винде отображается, в чем проблема может быть?
ниже код
<div>
<div id="map" style="width:460px; height:327px"></div>
</div>
<script src="//api-maps.yandex.ru
<script>
$(function() {
var myMap, x, y;
function init () {
// Создание экземпляра карты и его привязка к контейнеру с
// заданным id ("map").
console.log("Initialize map on coords: " + x + " " + y);
myMap = new ymaps.Map('map', {
// При инициализации карты обязательно нужно указать
// её центр и коэффициент масштабирования.
center:[x, y], // Москва
zoom:14
});
var myGeoObject = new ymaps.GeoObject({
// Описание геометрии.
geometry: {
type: "Point",
coordinates: [x, y]
},
// Свойства.
properties: {
// Контент метки.
iconContent: 'Наш офис',
}
},{
// Опции.
// Иконка метки будет растягиваться под размер ее содержимого.
preset: 'twirl#redStretchyIcon',
// Метку можно перемещать.
draggable: false
});
myMap.controls.add('zoomControl', { left: 5, top: 5 });
myMap.geoObjects.add(myGeoObject)
}
$.ajax({
url: "http://geocode-maps.yandex.ru/1.x/",
type: "GET",
dataType: "xml",
data: {
geocode: "{$settings->company_address}"
},
success: function(xml) {
var coords = $(xml).find("Point pos").text().split(" ");
if(coords.length == 2) {
y = coords[0];
x = coords[1];
ymaps.ready(init);
} else {
alert("Некорректный адрес");
}
}
})
})
</script>