Multimap API – New Route ‘Actions’
Web applications using Multimap API Routing often include custom ‘travel direction icons’ in the route instructions for clarity and a richer user experience. For example Ford use icons to indicate the direction of turn in their Irish Ford Dealer Locator routing:
The RAC has followed a similar approach with their route planner instructions:
Previously developers who are created their own travel directions icons needed to know what all the possible text instructions were, so that they could assemble a full set of images, and then parse the route instructions for the descriptions so that the correct icon could be used for each step. This got worse if you were implementing applications with several languages, as you would have to look for a different set of instructions with each language!
Thankfully Multimap has been working hard to produce language independent symbol/step_type tokens that can be used by developers to create their own strings or display their own icons. So now developers do not have to parse variable instruction strings, but just use the new tokens instead.
This new feature involves step attribute called ‘actions’ which can be used by to build step icons. So, for example, you can make your own turn_left.gif and roundabout_1.gif etc and don’t have to parse the instruction to extract the information on which steps should be given these icons, but just check for the relevant actions ("turn_left" and "roundabout"). We expose these actions as an array called ‘actions’ which can have one or more action values
The full documentation on how to use this new feature is here
Happy routing!


