To draw routes on your map, do the following:
Step 1:
- Edit a map
- Open the widget “Progress Map Settings”.
- Click on the menu “Polylines settings”.
- Select the option “Yes” in the field “Draw Polyline option”.
Step 2:
- Scroll down to the section “Polylines”, then, click on the group field “Polyline 1” (or click on the button “Add new polyline” if this is not your first route).
- Enter your route name/title in the field “Polyline Label”.
- Enter the unique name/key/ID of your route in the field “Polyline ID/Name”. Do not use the same name/key/ID for multiple routes on the same map!
- Specify the route points type in the field “Polyline points type”, then, draw your route using one of these methods:
- 1st Method: Draw a route by connecting multiple posts already available on the map:
-
- In this field, select the option “Post IDs”.
- In the field “Polyline Path (Post IDs)”, select the posts that will be used/connected to form your route. You should add at least 2 posts!
-
- 2nd Method: Draw a route by providing the “lat,lng” coordinates:
-
- In this field, select the option “Lat,Lng”.
- Open the group field “Polyline Path [Lat,Lng]” and enter or paste the route coordinates in the field/textarea “Polyline coordinates” by putting each line segment (LatLng) as [Lat,Lng] or [Lng,Lat] seperated by comma. For example,
[45.5215,-1.5245],[41.2587,-1.2479],[40.1649,-1.9879]
- Select the coordinates format in the field “LatLngs order”.
-
- 3rd Method: Draw your route in the plugin settings:
-
- In this field, select the option “Lat,Lng”.
- Open the group field “Polyline Path [Lat,Lng]” and draw your route. Since version 5.2, a new feature has been added allowing you to easly draw your routes. All the inscructions you’ll need to use that drawing tool can be found under that field. Read the insctructions and start drawing!
-
- 1st Method: Draw a route by connecting multiple posts already available on the map:
- Once finished drawing, scroll down and open the group field “Polyline options”.
- Choose whether this route handles mouse events or not by choosing an option in the field “Clickable”.
- If your route is clickable, you may want to open a link when the user clicks on it. Paste your route link in the field “Polyline redirect URL”, then, choose how to open the link in the field “URL target”.
- Enter the route description in the field “Polyline description”. The description will be displayed inside an infobox when the user hover over the route. For this to appear, your route must be clickable!
- Enter the maximum width (in pixels) of the infobox that will contain the route description in the field “Infowindow Maximum width”.
- Choose whether your route should follow the curvator of the earth or not by selecting an option in the field “Geodesic”.
- Enter the z-index of your route in the field “z-index”.
- Hide and/or show your route on the map by choosing an option in the field “Visibility”.
- To customize your route style, open the group field “Polyline style”.
- Modify the colors and values in the fields “Stroke color”, “Stroke opacity” and “Stroke weight”.
- In the field “Stroke type”, choose the route stroke type. You can draw linear routes or dashed routes!
- To add a new route, click on the button “Add new polyline”, then, repeat the steps above.