Yandex map
HTML
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="//api-maps.yandex.ru/2.0-stable/?load=package.standard,package.geoObjects,package.geoQuery,package.search&lang=ru-RU"></script>
<a id="avFindAround" href="#">Найти рядом</a>
<div class="av-map" id="load-map" style="height: 500px; width: 500px;"></div>
<input type="hidden" id="avMyPosition">
JavaScript
$(document).ready(function() {
//Узнаем положение и записываем
navigator.geolocation.getCurrentPosition(showPosition);
function showPosition(position) {
var y = $('#avMyPosition').val(position.coords.latitude + ', ' + position.coords.longitude);
}
$('#avFindAround').on('click', function (e) {
e.preventDefault();
ymaps.ready(init);
});
});
//Загрузка карты яндекс
ymaps.ready(init);
function init () {
var myMap = new ymaps.Map("load-map", {
center: [56.29738086, 43.98387431],
zoom: 11,
avoidFractionalZoom: false
}),
comissars,
itsme;
comissars = ymaps.geoQuery({
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {
balloonContent: 'Кстово<br> <strong style="font-size:16px; line-height:24px;">+7 (831) 219-94-04</string>'
},
geometry: {
type: 'Point',
coordinates: [56.148579603025304,44.20096641608691]
}
}, {
type: 'Feature',
properties: {
balloonContent: 'Бор<br> <strong style="font-size:16px; line-height:24px;">+7 (831) 219-94-04</string>'
},
geometry: {
type: 'Point',
coordinates: [56.35766536741835,44.070503769602546]
}
}, {
type: 'Feature',
properties: {
balloonContent: 'Дзержинск<br> <strong style="font-size:16px; line-height:24px;">+7 (831) 219-94-04</string>'
},
geometry: {
type: 'Point',
coordinates: [56.24201181629945,43.45672797988165]
}
}, {
type: 'Feature',
properties: {
balloonContent: 'Богородск<br> <strong...