Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Zemotacqy/hack-moscow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Oct 27, 2019
2 parents a8b2636 + b2c128f commit 96f59cb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/credentials.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ID = 'bzJzCTiNjafdtg'
SECRET = 'CR9Lb_THqhxHvEDBHh1wM4qC3Lo'
PASSWORD = 'abcapril19'
AGENT = 'Example Bot by /u/example_bot'
USERNAME = 'winchester1904'
48 changes: 48 additions & 0 deletions scripts/here.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

# coding: utf-8

# In[6]:





# In[67]:


import herepy


# In[68]:


geocoderApi = herepy.GeocoderApi('ZScu1x4Vpek7ifBeLhbq', 'WnXYEtv1dTUluyEiXpnK4A')
response = geocoderApi.free_form('Dmitrovskoye Shosse, 9, Moscow, Russia')
routingApi = herepy.RoutingApi('ZScu1x4Vpek7ifBeLhbq', 'WnXYEtv1dTUluyEiXpnK4A')


# In[70]:


#print(response)
latitude= response.Response['View'][0]['Result'][0]['Location']['DisplayPosition']['Latitude']
longitude= response.Response['View'][0]['Result'][0]['Location']['DisplayPosition']['Longitude']

#distance to india

routingApi = herepy.RoutingApi('ZScu1x4Vpek7ifBeLhbq', 'WnXYEtv1dTUluyEiXpnK4A')
response = routingApi.car_route([19.174, 72.86],
[latitude, longitude],
[herepy.RouteMode.car, herepy.RouteMode.fastest])
print(response)


# In[71]:


routingApi = herepy.RoutingApi('ZScu1x4Vpek7ifBeLhbq', 'WnXYEtv1dTUluyEiXpnK4A')
response = routingApi.car_route([19.174, 72.86],
[latitude, longitude],
[herepy.RouteMode.car, herepy.RouteMode.fastest])
print(response)

0 comments on commit 96f59cb

Please sign in to comment.