JUNIOR_DEVELOPER Telegram 1036
This media is not supported in your browser
VIEW IN TELEGRAM
Geolokatsiyani aniqlash va uni xaritada ko'rsatish 🗺

Geolocation
API yordamida foydalanuvchining koordinatalarini olishingiz va keyin ularni xaritadan joyni topish uchun ishlatishingiz mumkin.

        <p class="status"></p>
<iframe class="map" src=""></iframe>
<button class="button">Men qayerdaman?</button>


const button = document.querySelector(".button"),
map = document.querySelector(".map"),
status = document.querySelector(".status");

button.addEventListener('click', findLocation);

function findLocation() {
if (!navigator.geolocation) {
status.textContent = 'Ваш браузер не дружит с геолокацией...';
} else {
navigator.geolocation.getCurrentPosition(success, error);
}

function success(position) {
const { longitude, latitude } = position.coords;
map.src = `https://www.openstreetmap.org/export/embed.html?bbox=${longitude}%2C${latitude}&amp;layer=mapnik`;
}

function error() {
status.textContent = 'Baribir topaman!:0';
}
}


👉🏼 @Frontend 👈🏼



tgoop.com/junior_developer/1036
Create:
Last Update:

Geolokatsiyani aniqlash va uni xaritada ko'rsatish 🗺

Geolocation
API yordamida foydalanuvchining koordinatalarini olishingiz va keyin ularni xaritadan joyni topish uchun ishlatishingiz mumkin.

        <p class="status"></p>
<iframe class="map" src=""></iframe>
<button class="button">Men qayerdaman?</button>


const button = document.querySelector(".button"),
map = document.querySelector(".map"),
status = document.querySelector(".status");

button.addEventListener('click', findLocation);

function findLocation() {
if (!navigator.geolocation) {
status.textContent = 'Ваш браузер не дружит с геолокацией...';
} else {
navigator.geolocation.getCurrentPosition(success, error);
}

function success(position) {
const { longitude, latitude } = position.coords;
map.src = `https://www.openstreetmap.org/export/embed.html?bbox=${longitude}%2C${latitude}&amp;layer=mapnik`;
}

function error() {
status.textContent = 'Baribir topaman!:0';
}
}


👉🏼 @Frontend 👈🏼

BY Frontend


Share with your friend now:
tgoop.com/junior_developer/1036

View MORE
Open in Telegram


Telegram News

Date: |

The visual aspect of channels is very critical. In fact, design is the first thing that a potential subscriber pays attention to, even though unconsciously. The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. Just as the Bitcoin turmoil continues, crypto traders have taken to Telegram to voice their feelings. Crypto investors can reduce their anxiety about losses by joining the “Bear Market Screaming Therapy Group” on Telegram. Click “Save” ; Although some crypto traders have moved toward screaming as a coping mechanism, several mental health experts call this therapy a pseudoscience. The crypto community finds its way to engage in one or the other way and share its feelings with other fellow members.
from us


Telegram Frontend
FROM American