Hello.
I try to determine by means of the embedded code on the site some data of a person, for example, where he is (city, country).
function geopotision(){ var script = document.createElement('script'); script.src = "http://api-maps.yandex.ru/2.0/?load=package.full&lang=ru-RU"; document.getElementsByTagName("head")[0].appendChild(script); var map; var city, country; ymaps.ready(init); function init () { var geolocation = ymaps.geolocation; city = geolocation.city; country = geolocation.country; // console.log(city); // console.log(country); } } in the browser panel says: Uncaught ReferenceError: ymaps is not defined
What do you tell me?