Пример #1
0
 def __init__(self):
     self.modes = {'walk':[herepy.RouteMode.pedestrian,herepy.RouteMode.shortest],'bus':[herepy.RouteMode.publicTransport,herepy.RouteMode.fastest],'car':[herepy.RouteMode.car,herepy.RouteMode.fastest,herepy.RouteMode.traffic_enabled]}
     self.api_key = self.getconfig("maps_api")#"NuWLrM7oE23-PKjQWHD79izu0aFFvYdEu7wZV0SanSE"
     self.max_radius = self.getconfig("maxradius")*1000 #Enter in KM
     self.geocoderApi = herepy.GeocoderApi(self.api_key)
     self.geocoderAutoCompleteApi = herepy.GeocoderAutoCompleteApi(self.api_key)
     self.routingApi = herepy.RoutingApi(self.api_key)
     self.geocoderReverseApi = herepy.GeocoderReverseApi(self.api_key)
     self.placesApi = herepy.PlacesApi(self.api_key)
     self.current_coordinates = [0,0]
     self.loadconfig()
Пример #2
0
 def setUp(self):
     api = herepy.GeocoderAutoCompleteApi('app_id', 'app_code')
     self._api = api
 def setUp(self):
     api = herepy.GeocoderAutoCompleteApi('api_key')
     self._api = api