Knowledge Base - Advanced Features Guide

Google route planner in marker bubbles

Introduction

In Geocode Factory you can display a route/directions panel near the map. You can select where to place this panel, and what your travel mode is (car or walking). You can create directions using two different methods :

  • Directions between 2 existing markers
  • Directions from a custom address (or user's position) to an entry

Configuration

Enable the route planner

There are 2 items to configure before using this feature. Both are in the map editor. Go to the maps manager, edit the map that you want to display routes on, and follow the next steps :

  • Under the "Display options" tab, locate the "Show route planner" option, and set it to Yes.
  • Under the "Layout" tab, set the [route] placeholder variable (see the Advanced map template article), where you need to display the directions panel.

google-maps-route-planer-configuration

Enable the route planner in marker bubble

To see the "Get directions" form you need to add the [waysearch] placeholder variable (see the Advanced bubble template article) where you want to see that option in the form.

You can also display a "locate me" icon which will determine the user browser coordinates and enter that in the "From" input with the geocoded address. To display this option you need to edit the component parameters and enable the "Locate me in waysearch" option.

google-maps-route-direction-frontend-bubble locateme

Enable the planner between markers

When you have connected 2 users profiles (friends), or linked entries with their owner, you should see connection lines between them. The connection lines are direct straight lines. Theses lines are clickable.

Usage

As we established, there are 2 ways to utilize the directions panel.

Directions from user to entry

Click the marker where you want to drive and in the bubble, the directions form should appear. If you then enter an address, the route will be calculated between this address and the marker's position.

google-maps-route-direction-frontend-bubble

Directions between markers

When the route planner is enabled, if you hover over the connection lines with the mouse, you will see an effect. If you then click on this line, the real route will be displayed, and the route panel will be completed with the directions.

google-map-route-display

Applies To

Geocode Factory 3, Geocode Factory 5