From 2267c208a8169dbb8fc640757b83a44c1b28188e Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Mon, 14 Apr 2014 12:52:38 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BF=D0=BE=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA=20=D0=BD=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=80=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 });