Create the url here. Maps Directions with addresses / coordinates passed

Does anyone know how to create the correct url for a here.commap link from my site? We use a large number of API calls to embed maps inside our website, but I want to send emails to people with a link 'Click Here for directions'pointing to routes here.comwith an address or coordinates embedded in the URL.

Example:

In Google Maps, all we need to do is make a simple link:

https://www.google.com/maps?saddr=32.5589671,-97.2586011&daddr=32.7787855,-97.4495476

Just go through the variables saddrand daddrthe URL. I tried everything to create the correct URL for maps here.com, and it does not handle it properly.

My best attempt:

https://www.here.com/directions/drive/32.2589671,-97.4486011/Weatherford,_Texas?x=ep&map=30.38114,-89.89326,6,normal

But it does not handle this URL correctly, and now I'm pretty stuck, since I tried everything I know to try.

+4
source share
1 answer

Something like https://www.here.com/directions/drive/start:lat1,lng1/end:lat2,lng2 seems to work.

  • The text before the colon provides the text of the start / end location
  • Between latitude and longitude there should be absolutely no .
  • If the option is mapnot added, by default, the entire route on the street map is displayed to display the map
  • map ?map=lat,lng,zoom,maptype, , , -

, ( map) Windows Phone , . , , Android iOS . "" , m.here.com .

- :

  • https://www.here.com/discover/restaurant?map=48.85,2.35,15,normal
  • - https://www.here.com/traffic/explore?map=40.7127,-74,15,normal
+1

Source: https://habr.com/ru/post/1569857/


All Articles