コード例 #1
0
 def __init__(self):
     super().__init__()
     uic.loadUi(join(UI, "map_output.ui"), self)
     self.map_api = MapAPI("Океанский просп., 17, Владивосток")
     self.map_api.set_zoom(10)
     self.name = f"map_{str(len(listdir(RESULTS)) + 1)}.png"
     self.update()
コード例 #2
0
 def __init__(self):
     super().__init__()
     uic.loadUi(join(UI, "map_output_hw1.ui"), self)
     self.map_api = MapAPI("Океанский просп., 17, Владивосток")
     self.map_api.set_zoom(10)
     self.name = f"map_{str(len(listdir(RESULTS)) + 1)}.png"
     self.update()
     self.hybrid_rb.toggled.connect(self.hybrid)
     self.satellite_rb.toggled.connect(self.satellite)
     self.scheme_rb.toggled.connect(self.scheme)
コード例 #3
0
    def __init__(self):
        super().__init__()
        uic.loadUi(join(UI, "map_output.ui"), self)

        map_api = MapAPI("Океанский просп., 17, Владивосток")
        map_api.set_zoom(18)
        name = f"map_{str(len(listdir(RESULTS)) + 1)}.png"

        img = Image.open(map_api.get_image())
        img.save(join(split(getcwd())[0], f"results/{name}"))

        scene = QGraphicsScene()
        scene.addPixmap(QPixmap(join(split(getcwd())[0], f"results/{name}")))
        self.display.setScene(scene)
コード例 #4
0
 def form_map(self):
     self.map_api = MapAPI(self.place)
     self.map_api.set_zoom(10)
     self.name = f"map_{str(len(listdir(RESULTS)) + 1)}.png"
     place = self.place
     self.map_api.add_pin(place)