PowerBuilder - Google Maps Distance API Example - Plus Spatial Query
Paul Murray
CODE AUTHOR
Posts: 1
Paul Murray created the code: PowerBuilder - Google Maps Distance API Example - Plus Spatial Query
With strong attribution to Daryl Foster...
Problem:
A client in the transportation space needed a way to add garage to garage time to hourly trips. So if you book a car service for 4.0 hours and the nearest base is 30 minutes away they wanted to add 60 minutes (30 minutes each way) to the trip in order to price it the way they want.
Approach:
Client and Developer agreed on a list of 30 cities in their country that had ‘bases’ or depots where cars could be counted on to go to/from the pickup location, perform the service and go back to the depot.
Create city_centers table with city_centers.csv file provided.*
Create place table with place.csv file provided.*
Create minutes_to_depot table as described.
The PowerBuilder project folder with all of the necessary objects is in geopostcodes - CXC.zip. The only change I made was to truncate the Google Maps API Key.
*You may need to delete the geography column before you import it as the data is self-generating.
These examples use PowerBuilder 2021 and Microsoft SQL Server 2019.
Problem:
A client in the transportation space needed a way to add garage to garage time to hourly trips. So if you book a car service for 4.0 hours and the nearest base is 30 minutes away they wanted to add 60 minutes (30 minutes each way) to the trip in order to price it the way they want.
Approach:
Client and Developer agreed on a list of 30 cities in their country that had ‘bases’ or depots where cars could be counted on to go to/from the pickup location, perform the service and go back to the depot.
Create city_centers table with city_centers.csv file provided.*
Create place table with place.csv file provided.*
Create minutes_to_depot table as described.
The PowerBuilder project folder with all of the necessary objects is in geopostcodes - CXC.zip. The only change I made was to truncate the Google Maps API Key.
*You may need to delete the geography column before you import it as the data is self-generating.
These examples use PowerBuilder 2021 and Microsoft SQL Server 2019.
This message has an attachment file.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.