Maps Route

Introduction

This extension module will add route functions to the Maps module. It also does a lot of caching to avoid problems with the limits of the API

You can use it as tags, so you can work with the route data, or you can put it directly as a polyline on the map.

Documentation versions

Installation

Prerequisites

Make sure your system meets the minimum requirements:

Installation Instructions

Update instructions

version 3.x

This version is a major update that can only be installed on top of version 2.x or higher. See https://addons.reinos.nl/news/maps-suite-3

Important notes

License

For every paid addon you need to validate your license in order to activate the module.

On a local environment, like *.dev *.local *.localhost *.test the license is valid for testing and building a new or existing sites. For every other domain, you need to have a valid license.

Process of validating

Once installed, you will asked to enter your license key. When you entered a valid license you can hit the "Save license" button. This will start validating your license and will redirect you to addons.reinos.nl to login into your account. You can also register a new account in this process.

Control panel overview

Once logged in, you are asked to use your current account or to login with another one.

Control panel overview

Using the current logged in account, the server will check all info related to your license and once valid, it will redirect you back to your site where you see either a success message or an error message.

Control panel overview

License field

This module is using a license field to check if the license for the module is valid or not. On addons.reinos.nl you can check your license and add your valid domains.

Control panel overview

In the Module CP you can enter then your license Control panel overview

When you enter a wrong license, the module will not work and it shows you an warning Control panel overview

Invalid license

Sometimes it happens that the license system says you have an invalid license. When this happens, make sure you have entered your domain url in your account, next to your license on addons.reinos.nl.

If this will not fix your license problem, please contact us on https://addons.reinos.nl/support

Map tag

With this tag you can add a route directly to a map. You can use it just like the {map:add_marker} tag, just put in inside the {exp:reinos_maps:map}...{/exp:reinos_maps:map} tag

The tag

{maps:add_route}

Tag parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above.

address:from

A from address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:from="" [REQUIRED] if latlng:from is empty

latlng:from

latitude longitude coordinates

latlng:from="" [REQUIRED] if address:from is empty

address:to

A to address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:to="" [REQUIRED] if latlng:to is empty

latlng:to

latitude longitude coordinates

latlng:to="" [REQUIRED] if address:to is empty

address:waypoints

stops between the from and to point. addresses seperated with a pipline '|'

address:stops="" [OPTIONAL] if latlng:stops is empty

latlng:waypoints

stops between the from and to point. latitude longitude coordinates seperated with a pipline '|'

latlng:stops="" [OPTIONAL] if address:stops is empty

travel_mode

set the travel mode.
values: driving transit walking

travel_mode="driving" [OPTIONAL]

stroke:color

set the stroke color.

stroke:color="#131540" [OPTIONAL]

stroke:opacity

set the stroke opacity.

stroke:opacity="0.6" [OPTIONAL]

stroke:weight

set the stroke weight.

stroke:weight="6" [OPTIONAL]

Fit tag

To fit the routes on the map, the route module add the following tag to the {exp:maps:map}

fit_map:routes

Fit the map based on the routes

{exp:reinos_maps:map
    fit_map:routes="no" [OPTIONAL]    
}

Direction/Route Tag

Return multi-part directions for a series of waypoints. Directions for several modes of transportation are available.

The tag

{exp:reinos_maps:route}

Tag parameters

Below are the Tag Parameters. Those parameters can be used in the tag described above.

address:from

A from address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:from="" [REQUIRED] if latlng:from is empty

latlng:from

latitude longitude coordinates

latlng:from="" [REQUIRED] if address:from is empty

address:to

A to address name, can also a name like 'reichenbach im vogtland or amsterdam or america'.

address:to="" [REQUIRED] if latlng:to is empty

latlng:to

latitude longitude coordinates

latlng:to="" [REQUIRED] if address:to is empty

address:waypoints

Stops between the from and to point. addresses seperated with a pipline '|'

address:stops="" [OPTIONAL] if latlng:stops is empty

latlng:waypoints

Stops between the from and to point. latitude longitude coordinates seperated with a pipline '|'

latlng:stops="" [OPTIONAL] if address:stops is empty

optimize_waypoints

By default the waypoints are in order how you request it. To have a better and optimized route, you can enable this param so it gives you a better route.

optimize_waypoints="no" [OPTIONAL]

travel_mode

set the travel mode.
values: driving walking walking

travel_mode="driving" [OPTIONAL]

avoid

values: tolls highways ferries
You can use multiple options separated with a pipeline (|)

avoid="tolls" [OPTIONAL]

lang

Set the language based on the language code

lang="en" [OPTIONAL]

Tag variables

Below are the Tag variables. (note the prefix directions:)

direction:distance:text

The distance

{direction:distance}

direction:duration

The duration/time

{direction:duration:text}

direction:start_location

The start location

{direction:start_location}

direction:end_location

The end location

{direction:end_location}

direction:steps

The steps pair tag hold all the steps to on the route

{direction:steps}...{/direction:steps}

direction:steps:distance

The distance

{direction:steps}
    {direction:steps:distance}
{/direction:steps}

direction:steps:duration

The duration/time

{direction:steps}
    {direction:steps:duration}
{/direction:steps}

direction:steps:location

The location where the action should take

{direction:steps}   
    {direction:steps:location}
{/direction:steps}

direction:steps:instruction

Formatted HTML instructions of the step

{direction:steps}   
    {direction:steps:instruction}
{/direction:steps}

direction:steps:travel_mode

The travel mode

{direction:steps}
    {direction:steps:travel_mode}
{/direction:steps}

Changelog

3.0.0 (02-12-2020)

Breaking changes See https://addons.reinos.nl/news/maps-suite-3

You need at least v2.0.0 or higher to upgrade to this version. Inside all v3.x.x releases, there is a v2.x.x. release. You can use this version to upgrade to the latest v2.x.x and after that upgrade you are good to go to update to v3.x.x. Remember, its just replacing files and hit the upgrade button. There is no other action required, it's that simple (but required).

2.0.1 (30-09-2019)

2.0.0 (16-06-2019)

*Note: There is a change you will have to validate the license again

\Note:** Because the module has been renamed with a prefix reinos_ there is an update path by simply add the new update to your site and install it. By installing the module, you are disabling the old module that can be deleted afterward. Also note that you have to rename the module calls and hooks with a prefix reinos_

See this article about the rename https://addons.reinos.nl/news/modules-renamed

1.1.0 (19-12-2018)

1.0.0 (10-10-2018)