pure-maps icon indicating copy to clipboard operation
pure-maps copied to clipboard

Update tile URL for HERE traffic

Open omartijn opened this issue 11 months ago • 4 comments

This fixes 400 errors when trying to use HERE traffic tiles with a newer account. The old URL was deprecated and only works in older accounts.

Note: I do not have access to an old account and I cannot be sure that this works correctly for old accounts. Please test this before merging.

omartijn avatar Jan 04 '25 21:01 omartijn

Thank you very much! I will review it in the next few days. Note that tools subfolder has some scripts that may help with HERE languages maps generation.

rinigus avatar Jan 05 '25 16:01 rinigus

it looks to be mostly working except if you use mar default language: local. In this case, lang=mul is added to URL and I am getting errors (400) with a message

  "details": [
    {
      "message": "The 'lang' parameter in 'query' has an error: string doesn't match the regular expression \"^[a-z]{2}(-[a-zA-Z]{1,4})?$\""
    }

I wonder what is the analog of mul in the new API? This is using old account

rinigus avatar Jan 20 '25 18:01 rinigus

PS: sorry for delay!

rinigus avatar Jan 20 '25 18:01 rinigus

Well, according to the Migration Guide they now use BCP 47, it mentions the following:

The 'mul' (Multiple) primary language subtag identifies content in multiple languages. This subtag SHOULD NOT be used when a list of languages or individual tags for each content element can be used instead. For example, the 'Content- Language' header [RFC3282] allows a list of languages to be used, not just a single language tag.

I cannot find another suggestion as to what to use. I guess you want to use this to get the native names (i.e. the ones local to what you are looking at). I think Pure Maps should get the language code for the country being viewed here.

omartijn avatar Jan 31 '25 17:01 omartijn