D
D
Denis2016-02-14 00:44:09
JavaScript
Denis, 2016-02-14 00:44:09

How to implement geolocation by ip through API v. 2.1 Yandex Maps?

Hello!
In version API 2.0 there is such an example https://tech.yandex.ru/maps/jsbox/2.0/geolocation_ip/
I redid it in my own way. I only need text data about the city:

ymaps.ready(function() {
  console.log( ymaps.geolocation.city )   
});

How to get the same but on API version 2.1?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2016-02-14
@Taraflex

It's easier to define on your server
https://sypexgeo.net/en/download/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question