Esempio n. 1
0
	def create(self, graph_fname):
		self.gfile = osmgraph_bidi_file.graph_file(graph_fname)
		self.graph = car_routing.graph(self.gfile)

		helper = geo_helper.layer(self.widget)
		helper.zoom_to(self._graph_gps_bounds())

		bounds = qt_helper.grect_to_qrect(self._graph_bounds())
		self.vertex_qtree = qtree.qtree(bounds)
		fill_vertex_qtree(self.graph, self.vertex_qtree)
Esempio n. 2
0
	def create(self, graph_fname):
		ext = os.path.splitext(graph_fname)[1]
		if ext == '.grp':  # forward graph
			self.gfile = osmgraph_file.graph_file(graph_fname)
			self.graph = osmgraph_graph.graph(self.gfile)

		helper = geo_helper.layer(self.widget)
		helper.zoom_to(self._graph_gps_bounds())

		bounds = qt_helper.grect_to_qrect(self._graph_bounds())
		self.vertex_qtree = qtree.qtree(bounds)
		fill_vertex_qtree(self.graph, self.vertex_qtree)
Esempio n. 3
0
	def _zoom_to_data(self):
		helper = geo_helper.layer(self.widget)
		helper.zoom_to(self._geo_bounds())