This iOS demo application showcases the integration of Amazon Location Service for calculating truck-specific routes using SwiftUI. The app demonstrates how to implement route calculations with custom truck parameters while avoiding toll roads and tunnels.
It's an extremely simple code, so it's ideal for those who are just starting to use Amazon Location Service for iOS.
- Interactive map display using MapLibre
- Truck-specific route calculation
- Custom vehicle parameters support including:
- Axle count
- Engine type
- Gross weight
- Hazardous cargo handling
- Vehicle dimensions
- Speed limitations
- Route avoidance options for toll roads and tunnels
- Visual route display on the map
- Xcode 15.0 or later
- iOS 15.0 or later
- AWS Account with Amazon Location Service configured
- Amazon Cognito Identity Pool
git clone https://github.com/msysh/aws-sample-location-service-route-for-ios.git
cd aws-sample-location-service-route-for-ios
cd cdk
npm install
npx cdk deploy
cd ios/AmazonLocationServiceRouteDemo
open AmazonLocationServiceRouteDemo.xcodeproj
Configure following properties:
Key | Description | Example Value |
---|---|---|
AmazonCognitoIdentityPoolId | Cognito ID Pool's ID | <region>:<random-value> |
AmazonLocationServiceApiKey | API Key value | v1.public.a1b2c3... |
AmazonLocationServiceMapStyle | Map style | Standard , Monochrome ... etc |
AmazonLocationServiceRegion | AWS region | us-east-1 |
Before cdk destroy
, you need delete API key of Location Service following command:
aws location delete-key --key-name ${API_KEY_NAME} --force-delete
And then, you can delete AWS resources following command:
cd aws-sample-location-service-route-for-ios/cdk
cdk destroy
/cdk
- AWS CDK infrastructure code/ios
- iOS application source code
Apache-2.0 license