Answer the question
In order to leave comments, you need to log in
How to change the zoom after finding the location?
Good afternoon.
I determine the geolocation through the browser in the following way:
$button.check_location.click(function() {
ymaps.geolocation.get({
provider: 'browser',
mapStateAutoApply: true
}).then(function (result) {
result.geoObjects.options.set('preset', 'islands#redCircleIcon');
ymap.geoObjects.add(result.geoObjects);
});
});
ymap.setCenter({result.geoObjects.get(0).geometry.getCoordinates(), 14, {duration: 300}});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question