Я на карте

This commit is contained in:
Krivchikov Dmitry 2014-04-09 12:33:27 +04:00
parent 049c877af5
commit 7fdf4f446d
2 changed files with 16 additions and 1 deletions

View File

@ -10,7 +10,7 @@
</div>
<div class="col-lg-6">
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-align-justify"></span> Маршрут</button>
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-screenshot"></span> Я на карте</button>
<button class="btn btn-default" type="button" onclick="showMeOnTheMap()"><span class="glyphicon glyphicon-screenshot"></span> Я на карте</button>
</div>
<div class="col-lg-3 text-right">
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-plus-sign"></span> Добавить точку</button>

View File

@ -102,3 +102,18 @@ function searchAdderess()
function (err) {}
);
}
function showMeOnTheMap()
{
myMap.geoObjects.add(
new ymaps.Placemark(
[ymaps.geolocation.latitude, ymaps.geolocation.longitude],
{
balloonContentHeader: ymaps.geolocation.country,
balloonContent: ymaps.geolocation.city,
balloonContentFooter: ymaps.geolocation.region
},
{iconImageHref: '/ico/man.png', iconImageSize: [32, 37]}
)
);
}