Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Talk:HERE Maps API - Advanced Routing

From Wiki
Jump to: navigation, search

Mzabaluev - Improve the examples

The code in the examples could be improved.

The function splitQueryString could return the array instead of filling a global context variable as a side-effect. It could also unescape the key names and values right there.

If there are enumerations defined for turn and action codes (as they should be in a decent API), why do the examples use magic numbers?

The metric-to-imperial conversion example is an embarrassment. Human-friendly renderings for the preferred unit system should be done by the engine.

Functions returning HTML formatted text are just wrong. They should construct DOM elements, because that's what the browser works with.

mzabaluev 13:37, 5 March 2012 (EET)

Jasfox - DOM version added.

I've taken on board your comments and updated the code to include a DOM version - I'll not get into the appendChild vs innerHTML debate, but you're right there should be library functions available which create DOM elements directly. splitQueryString is just a "quick and dirty" parsing function, I've corrected the code to use decodeURI rather than unescape though, so it now works in Chinese.

The current state of the human readable guidance interface is poor, hence the magic numbers and the conversion code. It is ugly, but it works with the 2.1.1 API as it is. Hopefully an updated version of the API address those criticisms and mean I can tidy that up as well.

jasfox 12:27, 6 March 2012 (EET)

Eman.Refaat - indoor routing

Hi EveryOne, I wonder, Is it possible to use routing api on my routes which implemented inside Kml file? I am trying to make indoor routing on Nokia map :)

Thank you

Eman.Refaat 19:40, 7 February 2013 (EET)