feat/pitch-roll #1

Merged
zenloger merged 24 commits from feat/pitch-roll into main 2026-02-20 16:50:16 +03:00
Showing only changes of commit 31c0f13361 - Show all commits

View File

@@ -12,15 +12,23 @@ from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
def generateURL(lat=49.103814, lon=55.794258, zoom=10):
def generateURL(lat: float, lon: float, zoom: int):
return f"https://yandex.ru/maps/43/kazan/?l=sat&ll={lat}%2C{lon}&z={zoom}"
class YandexMap:
def __init__(self):
initial_zoom: int
initial_lat: float
initial_lon: float
def __init__(self, initial_lat=49.103814, initial_lon=55.794258, initial_zoom=10):
self.initial_lat = initial_lat
self.initial_lon = initial_lon
self.initial_zoom = initial_zoom
options = webdriver.ChromeOptions()
# options.add_experimental_option("detach", True)
self.driver = webdriver.Chrome(options)
self.driver.get(generateURL())
self.driver.get(generateURL(initial_lat, initial_lon, initial_zoom))
self.driver.maximize_window()
sleep(2)
@@ -107,4 +115,4 @@ class YandexMap:
cropped_image = image[y1:y2, x1:x2]
# Если нужно вернуть изображение как результат функции:
return cropped_image
return cropped_image