What is the new URL schema for Here WeGo v4 on iOS/Android?

869 Views Asked by At

The URL schema for Here WeGo on iOS and Android changed with version 4. It's no longer here-location://, here-route://, and here-place://.

I looked at the metadata and can see it's now just wego:// for everything, but that's all I can get from the metadata. From trial and error it looks like wego://route causes the app to launch as if I had passed it a route, however everything I've tried (e.g. wego://route/mylocation/37.870090,-122.268150) results in it just sitting there with my current location as the start and destination. Similar behavior for location and place.

It looks like the old documentation for the URL schema was removed from the developer portal, and either wasn't replaced with updated docs, or has been moved to somewhere hard to find.

Can someone from the Here team please post the updated schema information? Thanks!!

2

There are 2 best solutions below

0
On

I know that this is over a year old but I since it keeps coming up on the top of Google search, I wanted to share an updated.

I have found that you can use the computed URL of https://share.here.com/r/latitude,longitude,place_name?m=d&t=normal (substituting latitude,longtitude and place_name, of course).

The first time you open this URL, you get prompted by Safari (or your default browser) to open Here WeGo. If you choose "Allow Always" then subsequent links go directly into the navigation panel with the destination being the address you specify.

You can also write some interesting Shortcuts that allow you to search your Contacts for an address, convert that into lat/long and then go directly to the navigation.

I guess if you could capture the internal URL that the share.here.com sends back, you could determine the direct internal link.

0
On

For those who are Googling:

  • add "wego" to the [Queried URL Schemes] item in the info.plist file

  • write this function

    func coordinate(location: CLLocationCoordinate2D, label:String) {
         let phonePoint = String(format: "https://share.here.com/l/%f,%f,%@", location.latitude,  location.longitude,
                             label.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed) ?? "")
         if let phoneURLMaps = URL(string: phoneSt) {
             let phonOpen = String(format: "wego://route/mylocation/%f,%f,%",location.latitude, location.longitude
             if let phonOpenLMaps = URL(string: phonOpen) {
                if UIApplication.shared.canOpenURL(phonOpenLMaps) {
                   UIApplication.shared.open(phoneURLMaps, options: [:], completionHandler: nil)
                }
             }
         }
    }