diff --git a/public/js/main.js b/public/js/main.js index f1f210e..b7060b7 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -11,7 +11,7 @@ var im; function init() { myMap = new ymaps.Map("map", { center: [ymaps.geolocation.latitude, ymaps.geolocation.longitude], - zoom: 9, + zoom: 12, behaviors: ['default', 'scrollZoom'] }); @@ -46,7 +46,8 @@ function init() { }, { iconImageHref: '/ico/man.png', - iconImageSize: [32, 37] + iconImageSize: [32, 37], + iconImageOffset: [-16, -33], } ); myMap.geoObjects.add(im); @@ -66,6 +67,7 @@ function getPoints() },{ iconImageHref: data[k]['categoryIcon'], iconImageSize: [32, 37], + iconImageOffset: [-16, -33], openEmptyBalloon: true, balloonCloseButton: false }); @@ -128,6 +130,7 @@ function showMeOnTheMap() { navigator.geolocation.getCurrentPosition(function(pos) { im.geometry.setCoordinates([pos.coords.latitude, pos.coords.longitude]); + myMap.setCenter(im.geometry.getCoordinates()); }); myMap.setCenter(im.geometry.getCoordinates()); @@ -166,6 +169,7 @@ function addPoint() }, { iconImageHref: categories[$('#addPointCategoryId').val()].icon, iconImageSize: [32, 37], + iconImageOffset: [-16, -33], openEmptyBalloon: true, balloonCloseButton: false });