ProMaps

Unit Of Measurement

ProMaps.UnitOfMeasurement History

Hide minor edits - Show changes to output

May 19, 2023, at 04:59 PM by 192.88.134.15 -
Changed line 10 from:
%center% %width=440% [[https://www.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png | https://www.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png]]
to:
%center% %width=440% [[https://archive.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png | https://archive.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png]]
April 12, 2017, at 10:53 PM by KC Embrey - Updated wording and order of the paragraphs.
Deleted lines 0-3:
!! Can I change the unit of measurement (km/mi) in ProMaps?

Absolutely! A small change is required in your "Get Route" script in order to specify the change.

Changed lines 3-5 from:
Since ProMaps uses the Google Maps API, the unit of measurement is determined by the starting location of the route (your origin). If this isn't your desired behavior, you can specify the unit of measurement to be used for all routing requests.

!! Implementation
to:
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
April 05, 2017, at 12:14 AM by KC Embrey - New section
Added lines 1-18:
!! Can I change the unit of measurement (km/mi) in ProMaps?

Absolutely! A small change is required in your "Get Route" script in order to specify the change.

!! How is the unit of measurement determined in ProMaps?

Since ProMaps uses the Google Maps API, the unit of measurement is determined by the starting location of the route (your origin). If this isn't your desired behavior, you can specify the unit of measurement to be used for all routing requests.

!! Implementation
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 )@@

%center% %width=440% [[https://www.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png | https://www.seedcode.com/pmwiki/uploads/GoMaps/GetRouteScURL.png]]

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!
(855) SEEDCODE
[email protected]
Follow us: