Unit Of Measurement

How is the unit of measurement determined in ProMaps?

ProMaps uses the Google Maps API. According to Google, this route summary text uses the unit system of the origin's country or region by default. In the case of ProMaps the origin is your starting location of the route. For example, if your origin is in Canada, the route summary will be measured in km/m, but if it's in the US, it will be measured in mi/ft. If this isn't your desired behavior, you can specify the unit of measurement to be used for all routing requests.

Implementation: Changing the Get Route script

In order to specify the unit of measurement, you will need to add "units=[unit]&" into the the value of the "Set Variable [$sc_url;]" line in your "Get Route" script (see highlighted line in screenshot) as detailed here:

$sc_url & "mode=" & Lower (MapSettings::RouteMethod) & "&units=metric&" & $sc_originParameters & "&" & $sc_destinationParameters & "&" & $sc_wayPoints & If ( not IsEmpty ( MapSettings::GoogleAPIKey ) ; "&key=" & MapSettings::GoogleAPIKey )

To specify metric units (km/m), set units=metric, to specify imperial units(mi/ft), set units=imperial.

Once you've made the change, save the script and run the "Upon Opening ProMaps" script to see your changes apply!

Follow us: