Set up "Routes" between locations

Prev Next

Set up "Routes" between locations—multi-select feature

The multi-select feature in our QB Maps extension allows you to draw shapes on the map to select a subset of all the markers displayed on the map. You can set a source and a destination from this subset of markers and get the best route between these two points that also passes through the remaining locations in the subset.

To enable this feature, you need to pass an additional multiselect parameter in the URL. The following is an example of one such URL:

http://www.quickbaseutilities1.com/XXXXXX/QB Maps/default.aspx?clientid=Q999&appid=bbbbbbbbb&QB_DBID=bbbbbbbbb&query=
{'10'.EX.'CountyName'}&clist=3.71.70.6.7.8.9.10.11.72.12.47.35&W=1200&H=700&zoom=6&apptoken=bbbbbbbbbbbbbbbbbbbbbbbbbbbb&multiselect=True;

Note

Pass the value of this parameter as True (case-sensitive) to enable the feature.

The following is a walkthrough of how to use the multi-select feature:

Enable multiselect

If you passed the multiselect parameter in the URL, the Enable Multiselect checkbox appears on the Directions tab. Select this checkbox.

Enable Multiselect checkbox on the Directions tab

Use the drawing tools

Once you select this checkbox, the drawing tools become available on top of the map.

The drawing tools have three options:

  • Cursor—Default mouse behavior. It allows you to drag the map, zoom in, and select markers.
  • Polygon—This tool lets you plot the vertices of a polygon on the map. Once you complete the polygon, the markers that lie within it are selected.
  • Rectangle—Draws a rectangle on the map.

Note

Draw the polygon by selecting points on the map to plot the vertices. Don't drag to draw the polygon.

Polygon drawing tool selected on the map Rectangle drawn on the map to select markers

Image—drawing a polygon on the map.

Select a source and destination from the shape

After the shape is complete, the markers within it appear in the drop-downs for the source and destination. You can also clear the shape by selecting the Clear Shape button, then draw a new shape.

Markers selected within a drawn shape shown in the source and destination drop-downs

Get directions between selected locations

Select a source and destination from the drop-downs, then select Get Directions to get the best route that passes through all the waypoints in the selected subset.

Source and destination selected from drop-downs for multi-location directions

Best route calculated through all selected waypoints displayed on the map

Open or clear the route

Open the route in the native Google Maps app on mobile devices, or the Google Maps web app on desktop browsers, by selecting the Open Google Maps button.

Clear the route by selecting the Clear button to reset the map.

Cleared map after resetting the route

Show all pins while viewing directions

If you still want the pins from the other locations to show, include the &ddShowAll=True parameter in the URL to continue displaying those pins while the directions are shown.

Important

Google's API allows querying for the best route with a maximum of 10 waypoints for free. Any query with more than 10 waypoints is charged differently, per query. If your use case requires a higher number of waypoints, submit a technical support case to enable the feature.