Managing the map's routes
Another one of the new functionalities of the EasyDNNmaps module. The Routes functionality offers the user control over the creation, editing and managing Google routes through an interactive real-time interface.
The route creation interface is divided into two sections: Setting up the route itself and Setting up its waypoints.
Setting up the route options
The route setup section includes the following options:
Route name - the name that will be shown in the list of routes as well as on the route widget.
Description - the description that will be shown in the list of routes as well as on the route widget.
Active - if the route is set as inactive, it will still show in the route list, but it will not show on the route widget nor the map.
Icon - the icon that will be shown beside the route information in the route list and on the route widget.
Color - the color of the route's line that will be shown on the map.
Stroke opacity - the opacity of the route polyline, between 0.0 and 1.0.
Stroke weight - the weight of the route polyline, in pixels.
Route type - the route's travel type. The route will change depending on which travel type has been chosen.
Status - if the route is checked, it will be automatically shown as checked and visible on the routes widget, if it's unchecked it will not be shown until it is marked as checked on the routes widget.
Setting up the waypoint options
The waypoint setup section includes adding/editing specific waypoint types, changing their order and handling their options.
Location search - the main focus of this section. Entering the location in the search bar will trigger the Google autocomplete to fill in the matching places for the entered query. If you select one of the listed locations, an entry will be added to the route's waypoints at the right side of the map. By selecting the appropriate icon you can add a location of that type to the route's waypoints.
There are 3 types of markers available:
- Start marker - depicted in green
- End marker - depicted in blue and
- Waypoint - depicted in orange
By selecting a marker type you can add or replace specific route's markers. Once the start and the end markers have been added, you can add waypoints between them which will re-render and recalculate the route in real-time. Also, you can grab the marker's move handle and drag it wherever you like. Additionally, you can grab the marker itself on the map and change its location information to the location it was dropped on, thus re-rendering and recalculating the route.
The waypoint itself has the following options:
Title - the marker's title displayed on the map.
Icon - the marker's icon that will be displayed on the map.
Display - general visibility of the marker and its content.
Enable bubble - visibility of the marker bubble.
Bubble description - the content of the marker bubble.
Open bubble - defines the trigger type for opening the bubble. By default it is set to On click, but it can be set to On hover which will show the marker bubble when you hover above it.
After the route has been generated, there are two more fields shown to the user:
- Total distance - the distance from the start location to the end location, through all the waypoints. Shown in kilometres (km)
- Total duration - the total duration of the route depending on the route type selected
NOTE: To show the created routes on the map, don't forget to enable the Routes widget's visibility in Map editor > View settings > Widget settings > Routes settings > Enable routes or read the Routes settings section here.
Once the routes have been created, you can manage them by either dragging them and changing their position, delete them or duplicate them. Every action is rendered in real-time so you can see the result immediately.
Selecting the delete option, you are prompted to confirm your choice since it's instantaneous and permanent.
The duplicate option copies the selected route, all of its waypoints and localizations and adds it to the end of the route list, updating the new duplicated route's title with the suffix '_copy'.