<html>
<head>
<script src="http://yandex.st/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="css/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen, projection">
<script src="http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU " type="text/javascript"></script>
<script>
jQuery(document).ready(function() {
$('.edit_page').fancybox({
width : 1287,
height : '500px',
fitToView : false,
autoSize : false,
scrolling : 'no',
onComplete: function(){
}
});
});
</script>
</head>
<body>
<a href="test.html" onClick="return false;" class="edit_page">a</a>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml"><head><script charset="utf-8" src="https://clck.yandex.ru/jclck/dtype=stred/pid=443/cid=71834/path=map/rnd=0.523556743748486/*https://maps.yandex.ru/ "></script>
<title>а魥ĥﰮ鲪.</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
Ю嫫졁PI 롰x
Р𠬥
- load=package.full - ௫ 렻
- lang=ru-RU - 멩.
-->
<script type="text/javascript">
// ˠꡲלּ뮠ⴤ沠衣𠑐I 衣ﳮ⡄OM, 㼯שּׂ鮨騠
ymaps.ready(init);
function init () {
function dump(obj) {
var out = "";
if(obj && typeof(obj) == "object"){
for (var i in obj) {
out += i + ": " + obj[i] + "\n";
}
} else {
out = obj;
}
alert(out);
$('#fas').html(out);
}
var coords;
var myMap = new ymaps.Map("map", {
center: [66.42, 94.26], // ץ Ѯ
zoom: 3,
behaviors: ['default', 'scrollZoom','multiTouch'],
});
myMap.controls.add(
new ymaps.control.ZoomControl()
);
myMap.controls.add('mapTools');
var search = new ymaps.control.SearchControl();
myMap.controls.add(search, { left: '300px', top: '5px' });
search.events.add("resultselect", function (result){
document.getElementById('res').innerHTML = search.getResultsArray()[result.get('resultIndex')].geometry.getCoordinates();
});
$('#fas').click(function(){
myMap.redraw();
});
}
</script>
</head>
<body>
<div id="map" style="width: 800px; height: 300px"></div>
<a href="#" id="fas">as</a>
<span id="res"></span>
<script>
</script>
</body></html>
Как и везде проблема, при открытии карта не проресована пока не поменяешь размер окна. Не могу исправить это, прошу помощи.