Draw lines on a map from one point to another

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Draw lines on a map from one point to another

Hello @Jvyde Chestew​

Using addPloyline() method of Map widget we can draw the lines from one point to another point. This method will just draw straight lie between two locations.

http://docs.kony.com/konylibrary/visualizer/viz_widget_prog_guide/Default.htm#Map_Methods.htm#addPolyl%3FTocPath%3DReference%7CMap%2520Widget%7CMethods%7C_____6

If you are looking for routes then you have to use the searchRoutes() MAP API and which will give you the routes between the start and end points. Using the result you can add a polyline on the map.

http://docs.kony.com/konylibrary/visualizer/viz_api_dev_guide/Default.htm#kony_map_functions.htm#mapSrchR%3FTocPath%3DMap%2520API%7Ckony.map%2520Namespace%7CFunctions%7C_____4