├── .github └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── amazon-location-helpers ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── index.d.ts ├── index.js ├── package.json └── webpack.config.js ├── amazon-location-route-planner ├── .gitignore ├── .vscode │ └── extensions.json ├── README.md ├── index.html ├── package.json ├── postcss.config.cjs ├── src │ ├── App.vue │ ├── auth.js │ ├── components │ │ ├── Parameters.vue │ │ ├── PositionFeed.vue │ │ ├── RouteSummary.vue │ │ └── TravelMode.vue │ ├── config.js │ ├── main.js │ └── style.css ├── tailwind.config.cjs └── vite.config.js ├── amplify-ui-geo-explore ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── screenshot.png ├── src │ ├── App.jsx │ ├── components │ │ ├── common │ │ │ ├── InfoBox.jsx │ │ │ ├── InfoBox.module.css │ │ │ ├── LocationMarkers.jsx │ │ │ ├── LocationMarkers.module.css │ │ │ ├── Marker.jsx │ │ │ ├── Panel.jsx │ │ │ ├── Panel.module.css │ │ │ ├── PinIcon.jsx │ │ │ ├── Spinner.jsx │ │ │ ├── Spinner.module.css │ │ │ └── VehicleIcon.jsx │ │ ├── geofences │ │ │ ├── DrawControl.jsx │ │ │ ├── DrawnGeofences.jsx │ │ │ ├── GeofencesLayer.jsx │ │ │ ├── GeofencesPanel.jsx │ │ │ └── GeofencesPanel.module.css │ │ ├── places │ │ │ ├── PlacesLayer.jsx │ │ │ └── PlacesLayer.module.css │ │ ├── routes │ │ │ ├── CalculatedRoutePath.jsx │ │ │ ├── CalculatedRoutePoints.jsx │ │ │ ├── CalculatedRoutePoints.module.css │ │ │ ├── RoutesLayer.jsx │ │ │ ├── RoutesPanel.jsx │ │ │ └── RoutesPanel.module.css │ │ └── trackers │ │ │ ├── DevicePositionHistory.jsx │ │ │ ├── Devices.jsx │ │ │ ├── Devices.module.css │ │ │ ├── TrackersLayer.jsx │ │ │ ├── TrackersPanel.jsx │ │ │ └── TrackersPanel.module.css │ ├── configuration.js │ ├── constants.js │ ├── index.css │ ├── main.jsx │ └── theme.js └── vite.config.js ├── android-quick-start ├── README.md ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── amazon │ │ │ └── location │ │ │ └── android │ │ │ └── quickstart │ │ │ ├── AndroidQuickstartApp.kt │ │ │ └── MainActivity.kt │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ └── red_marker.png │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── raw │ │ └── amplifyconfiguration.json │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── themes.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── screenshot.png └── settings.gradle ├── athena-udfs ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── amazon-location-udfs.yaml ├── pom.xml └── src │ └── main │ └── java │ └── aws │ └── samples │ └── amazonlocation │ └── AmazonLocationUDFHandler.java ├── aurora-udfs ├── LICENSE ├── README.md ├── cloudformation │ └── template.yaml ├── search-place-index-for-position │ └── lambda_function.py ├── search-place-index-for-text │ └── lambda_function.py └── sql │ ├── f_SearchPlaceIndexForPosition.sql │ └── f_SearchPlaceIndexForText.sql ├── create-custom-map-style ├── .eslintrc.js ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ ├── README.md │ ├── backend │ │ ├── auth │ │ │ └── createcustommapstyle6210c835 │ │ │ │ └── cli-inputs.json │ │ ├── backend-config.json │ │ ├── geo │ │ │ └── customStyleMap │ │ │ │ ├── cli-inputs.json │ │ │ │ ├── customStyleMap-cloudformation-template.json │ │ │ │ └── parameters.json │ │ ├── tags.json │ │ └── types │ │ │ └── amplify-dependent-resources-ref.d.ts │ ├── cli.json │ ├── hooks │ │ └── README.md │ └── team-provider-info.json ├── index.html ├── media │ ├── AppSkeleton.png │ ├── BaseMap.png │ ├── CRA.png │ ├── ChangesAppear.png │ ├── LayerAfter.png │ ├── LayerBefore.png │ ├── Login.png │ ├── MaputnikDataSources.png │ ├── MaputnikEmpty.png │ ├── MaputnikExport.png │ ├── MaputnikJSONEditor.png │ ├── MaputnikLandNotIce.png │ ├── MaputnikLayers.png │ ├── MaputnikNewSource.png │ ├── MaputnikOpen.png │ ├── MaputnikOpenStyle.png │ └── OAI.png ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── example-style-descriptor.json │ └── main.jsx ├── tileserver │ ├── downloadSpritesGlyphs.sh │ ├── example-style-descriptor.json │ ├── package-lock.json │ ├── package.json │ ├── serveSpritesGlyphs.sh │ └── startServer.sh └── vite.config.js ├── geocode-udf-lambda-aurora ├── CloudFormation │ └── geocode-lambda-aurora.yml ├── Lambda │ ├── geocode.py │ └── lambda_function.py ├── README.md └── UDF │ ├── CreateFunction.sql │ └── CreateTable.sql ├── geocode-udf-lambda-redshift ├── CloudFormation │ └── geocode-lambda-redshift.yml ├── Lambda │ ├── geocode.py │ └── lambda_function.py ├── README.md └── UDF │ ├── CreateFunction.sql │ └── CreateTable.sql ├── geofence-utils ├── LICENSE ├── README.md ├── create-circular-geofence.py └── create-geojson-geofence.py ├── images └── launch-stack.svg ├── leaflet-amplify ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── leafletstarter3981405c │ │ │ └── cli-inputs.json │ │ ├── backend-config.json │ │ ├── geo │ │ └── mapcf4954c3 │ │ │ ├── cli-inputs.json │ │ │ ├── mapcf4954c3-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── img │ ├── README01.gif │ └── README02.png ├── index.html ├── package.json ├── public │ └── img │ │ └── icon │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ └── marker-shadow.png ├── src │ ├── main.ts │ ├── style.css │ └── vite-env.d.ts ├── tsconfig.json └── vite.config.ts ├── leaflet-vue-amplify ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── leafletvue022beae3 │ │ │ ├── leafletvue022beae3-cloudformation-template.yml │ │ │ └── parameters.json │ │ ├── backend-config.json │ │ ├── geo │ │ └── leafletvue │ │ │ ├── leafletvue-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── img │ └── README.png ├── index.html ├── package.json ├── public │ └── favicon.ico ├── src │ ├── App.vue │ ├── assets │ │ └── base.css │ ├── components │ │ └── MapPane.vue │ ├── main.js │ ├── router │ │ └── index.js │ └── views │ │ └── HomeView.vue └── vite.config.js ├── maplibre-gl-js-amplify-marker-tooltip-example ├── LICENSE ├── README.md └── index.html ├── maplibre-gl-js-amplify ├── LICENSE ├── README.md └── index.html ├── maplibre-gl-js-quick-start ├── LICENSE ├── README.md ├── main.css ├── main.js └── quickstart.html ├── maplibre-gl-js-vue-amplify-compare-maps ├── .gitignore ├── LICENSE ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── maplibreglvue8d050126 │ │ │ └── cli-inputs.json │ │ ├── backend-config.json │ │ ├── geo │ │ ├── esridarkgray │ │ │ ├── cli-inputs.json │ │ │ ├── esridarkgray-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── esriimagery │ │ │ ├── cli-inputs.json │ │ │ ├── esriimagery-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── esrilight │ │ │ ├── cli-inputs.json │ │ │ ├── esrilight-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── esrilightgray │ │ │ ├── cli-inputs.json │ │ │ ├── esrilightgray-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── esrinavigation │ │ │ ├── cli-inputs.json │ │ │ ├── esrinavigation-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── esristreet │ │ │ ├── cli-inputs.json │ │ │ ├── esristreet-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── hereexplore │ │ │ ├── cli-inputs.json │ │ │ ├── hereexplore-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── heretruck │ │ │ ├── cli-inputs.json │ │ │ ├── heretruck-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── opendatastandardlight │ │ │ ├── cli-inputs.json │ │ │ ├── opendatastandardlight-cloudformation-template.json │ │ │ └── parameters.json │ │ └── placeindex │ │ │ ├── cli-inputs.json │ │ │ ├── parameters.json │ │ │ └── placeindex-cloudformation-template.json │ │ ├── hosting │ │ └── amplifyhosting │ │ │ └── amplifyhosting-template.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── image │ └── README.png ├── index.html ├── package.json ├── public │ └── favicon.ico ├── src │ ├── App.vue │ ├── MapPane.vue │ ├── assets │ │ └── style.css │ └── main.js └── vite.config.js ├── maplibre-gl-js-vue-amplify ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── maplibrereact022beae3 │ │ │ ├── maplibrereact022beae3-cloudformation-template.yml │ │ │ └── parameters.json │ │ ├── backend-config.json │ │ ├── geo │ │ └── maplibrereact │ │ │ ├── maplibrereact-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── assets │ ├── base.css │ ├── index.html │ └── vite.config.js ├── img │ └── README.png ├── index.html ├── package.json ├── public │ └── favicon.ico ├── src │ ├── App.vue │ ├── assets │ │ └── base.css │ ├── components │ │ └── MapPane.vue │ ├── main.js │ ├── router │ │ └── index.js │ └── views │ │ └── HomeView.vue └── vite.config.js ├── maplibre-gl-js ├── LICENSE ├── README.md └── index.html ├── maplibre-js-react-iot-asset-tracking ├── .gitignore ├── LICENSE ├── README.md ├── assets │ ├── InfraStack.template.json │ ├── application-image.png │ ├── architecture-diagram.png │ ├── iot-core-screen.png │ └── stack-outputs.png ├── index.html ├── package.json ├── src │ ├── App.jsx │ ├── components │ │ ├── LineOverlay.jsx │ │ ├── Markers.jsx │ │ └── Pin.jsx │ ├── hooks │ │ └── useTracker.js │ ├── index.css │ └── main.jsx └── vite.config.js ├── maplibre-native-android ├── .gitignore ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── aws │ │ │ └── location │ │ │ └── demo │ │ │ ├── maplibre │ │ │ └── MainActivity.kt │ │ │ └── okhttp │ │ │ └── SigV4Interceptor.kt │ │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── configuration.xml │ │ ├── strings.xml │ │ └── themes.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── maplibre-native-ios ├── .gitignore ├── Amazon Location Service Demo.xcodeproj │ └── project.pbxproj ├── Amazon Location Service Demo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved ├── Amazon Location Service Demo │ ├── AWSSignatureV4Delegate.swift │ ├── Amazon_Location_Service_DemoApp.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── MapView.swift │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Podfile ├── Podfile.lock └── README.md ├── openlayers-amplify ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── openlayersstarter20b33ecd │ │ │ └── cli-inputs.json │ │ ├── backend-config.json │ │ ├── geo │ │ └── mapce7dbf38 │ │ │ ├── cli-inputs.json │ │ │ ├── mapce7dbf38-cloudformation-template.json │ │ │ └── parameters.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── img │ ├── README01.gif │ └── README02.png ├── index.html ├── package.json ├── src │ ├── @geoblocks:ol-maplibre-layer.d.ts │ ├── main.ts │ ├── style.css │ └── vite-env.d.ts ├── tsconfig.json └── vite.config.ts ├── package.json ├── react-map-gl-amplify-here-map ├── .eslintrc.json ├── .gitignore ├── README.md ├── amplify │ ├── .config │ │ └── project-config.json │ └── backend │ │ ├── auth │ │ └── awsheredemo4fc859b5 │ │ │ ├── awsheredemo4fc859b5-cloudformation-template.yml │ │ │ └── parameters.json │ │ ├── backend-config.json │ │ ├── customgeo │ │ └── routecalculator │ │ │ ├── parameters.json │ │ │ └── template.json │ │ ├── geo │ │ ├── map2bf94dcb │ │ │ ├── cli-inputs.json │ │ │ ├── map2bf94dcb-cloudformation-template.json │ │ │ └── parameters.json │ │ └── placeindex0e5572f7 │ │ │ ├── parameters.json │ │ │ └── placeindex0e5572f7-cloudformation-template.json │ │ ├── hosting │ │ └── amplifyhosting │ │ │ └── amplifyhosting-template.json │ │ ├── tags.json │ │ └── types │ │ └── amplify-dependent-resources-ref.d.ts ├── index.html ├── package.json ├── public │ ├── .gitignore │ ├── aws_logo.svg │ └── favicon.ico ├── src │ ├── App.jsx │ ├── AppContext.js │ ├── components │ │ ├── Header.jsx │ │ ├── overlays │ │ │ ├── Controls.jsx │ │ │ ├── CustomControl.jsx │ │ │ ├── Features.jsx │ │ │ ├── MarkerToast.jsx │ │ │ ├── Pin.jsx │ │ │ └── RoutingMenu.jsx │ │ ├── primitives │ │ │ ├── Button.jsx │ │ │ ├── NavigateIcon.jsx │ │ │ └── NumberField.jsx │ │ └── routing │ │ │ ├── AvoidanceOptions.jsx │ │ │ ├── DepartureTimeSelector.jsx │ │ │ ├── Inputs.jsx │ │ │ ├── MeasurementsOptions.jsx │ │ │ ├── ModeOptions.jsx │ │ │ ├── ModeSelector.jsx │ │ │ ├── Options.jsx │ │ │ ├── Summary.jsx │ │ │ └── TruckOptions.jsx │ ├── hooks │ │ ├── useAmazonLocationService.js │ │ ├── useDebounce.js │ │ └── useWindowSize.js │ ├── index.css │ └── main.jsx └── vite.config.js ├── react-map-gl-change-map-language ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── components │ │ ├── CustomControl.jsx │ │ └── LanguagesControl.jsx │ ├── configuration.js │ ├── hooks │ │ └── useLocalizedStyleDescriptor.js │ ├── index.css │ └── main.jsx └── vite.config.js ├── react-map-gl-clusters ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── components │ │ ├── ClustersFeature.jsx │ │ └── LocationPopup.jsx │ ├── configuration.js │ ├── data │ │ └── Earthquakes.json │ ├── index.css │ └── main.jsx └── vite.config.js ├── react-map-gl-map-styles ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── components │ │ ├── MapControl.jsx │ │ └── MapControl.module.css │ ├── configuration.js │ ├── index.css │ └── main.jsx └── vite.config.js ├── react-map-gl-markers ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── components │ │ ├── LocationPopup.jsx │ │ ├── MarkersFeature.jsx │ │ ├── MarkersFeature.module.css │ │ └── PinIcon.jsx │ ├── configuration.js │ ├── data │ │ └── AmazonHubLockers.json │ ├── index.css │ └── main.jsx └── vite.config.js ├── react-map-gl-polygons ├── .gitignore ├── LICENSE ├── README.md ├── index.html ├── package.json ├── public │ ├── .gitignore │ └── favicon.ico ├── src │ ├── components │ │ └── PolygonsFeature.jsx │ ├── configuration.js │ ├── data │ │ └── VancouverBoundary.json │ ├── index.css │ └── main.jsx └── vite.config.js ├── route-udf-lambda-redshift ├── CloudFormation │ └── route-lambda-redshift.yml ├── Lambda │ ├── lambda_function.py │ └── route.py ├── README.md └── UDF │ ├── CreateFunction.sql │ └── CreateTable.sql ├── tangram-es-android ├── .gitignore ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── aws │ │ │ └── location │ │ │ └── demo │ │ │ ├── okhttp │ │ │ └── SigV4Interceptor.kt │ │ │ └── tangram │ │ │ └── MainActivity.kt │ │ └── res │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values-night │ │ └── themes.xml │ │ └── values │ │ ├── colors.xml │ │ ├── configuration.xml │ │ ├── strings.xml │ │ └── themes.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── tangram-es-ios ├── .gitignore ├── Amazon Location Service Demo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Amazon Location Service Demo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Amazon Location Service Demo │ ├── AWSSignatureV4URLHandler.swift │ ├── Amazon_Location_Service_DemoApp.swift │ ├── Assets.xcassets │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ ├── MapView.swift │ └── Preview Content │ │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Podfile └── Podfile.lock ├── tangram-js ├── index.html └── sw.js ├── tracking-android ├── .gitignore ├── README.md ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── aws │ │ │ └── location │ │ │ └── demo │ │ │ └── trackingsample │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── aws │ │ │ │ └── location │ │ │ │ └── demo │ │ │ │ └── trackingsample │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v24 │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── drawable │ │ │ └── ic_launcher_background.xml │ │ │ ├── layout │ │ │ └── activity_main.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── themes.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ └── test │ │ └── java │ │ └── aws │ │ └── location │ │ └── demo │ │ └── trackingsample │ │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle └── tracking-ios ├── .gitignore ├── Podfile ├── README.md ├── TrackingSample.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── TrackingSample.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── TrackingSample ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── ContentView.swift ├── Info.plist ├── LocationManagement.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── TrackingSampleApp.swift ├── TrackingSampleTests ├── Info.plist └── TrackingSampleTests.swift └── TrackingSampleUITests ├── Info.plist └── TrackingSampleUITests.swift /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle files 2 | .gradle/ 3 | build/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Log/OS Files 9 | *.log 10 | 11 | # Android Studio generated files and folders 12 | captures/ 13 | .externalNativeBuild/ 14 | .cxx/ 15 | *.apk 16 | output.json 17 | 18 | # IntelliJ 19 | *.iml 20 | .idea/ 21 | misc.xml 22 | deploymentTargetDropDown.xml 23 | render.experimental.xml 24 | 25 | # Keystore files 26 | *.jks 27 | *.keystore 28 | 29 | # Android Profiling 30 | *.hprof 31 | 32 | .DS_Store 33 | 34 | node_modules -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Amazon Location Service Samples 2 | 3 | > [!IMPORTANT] 4 | > This repository has been archived and is no longer accepting contributions. Some of the samples have been moved to dedicated repositories that are linked below, while others have been deprecated or been incorporated as part of the [AWS Geospatial](https://github.com/aws-geospatial) GitHub organization. 5 | 6 | - [amplify-ui-geo-explore](https://github.com/aws-samples/amazon-location-amplify-ui-geo-explore) 7 | - [create-custom-map-style](https://github.com/aws-samples/create-custom-map-style) 8 | - [maplibre-js-react-iot-asset-tracking](https://github.com/aws-samples/amazon-location-service-iot-asset-tracking) 9 | 10 | ## Security 11 | 12 | See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. 13 | 14 | ## License 15 | 16 | This library is licensed under the MIT-0 License. See the LICENSE file. 17 | -------------------------------------------------------------------------------- /amazon-location-helpers/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | 4 | # ignore package-lock.json because it's managed at the project root level 5 | package-lock.json -------------------------------------------------------------------------------- /amazon-location-helpers/.npmignore: -------------------------------------------------------------------------------- 1 | examples/ 2 | webpack.config.js 3 | -------------------------------------------------------------------------------- /amazon-location-helpers/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /amazon-location-helpers/index.d.ts: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Credentials } from "@aws-sdk/types"; 5 | import mapboxgl from "maplibre-gl"; 6 | 7 | interface Config { 8 | credentials?: Credentials; 9 | identityPoolId?: string; 10 | region?: string; 11 | } 12 | 13 | export function createMap( 14 | config: Config, 15 | options: mapboxgl.MapboxOptions, 16 | mapgl?: typeof mapboxgl 17 | ): Promise; 18 | 19 | export function createRequestTransformer( 20 | config: Config 21 | ): Promise; 22 | 23 | export function getCredentialsForIdentityPool( 24 | identity: string 25 | ): Promise; 26 | -------------------------------------------------------------------------------- /amazon-location-helpers/webpack.config.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | module.exports = { 5 | entry: { 6 | "amazon-location.min": "./index.js", 7 | }, 8 | externals: [ 9 | { 10 | "mapbox-gl": { 11 | commonjs: "mapbox-gl", 12 | commonjs2: "mapbox-gl", 13 | root: "mapboxgl", 14 | amd: "mapbox-gl", 15 | }, 16 | "maplibre-gl": { 17 | commonjs: "maplibre-gl", 18 | commonjs2: "maplibre-gl", 19 | root: "maplibregl", 20 | amd: "maplibre-gl", 21 | }, 22 | }, 23 | ], 24 | output: { 25 | filename: "[name].js", 26 | path: __dirname + "/dist", 27 | library: { 28 | name: "AmazonLocation", 29 | type: "umd", 30 | umdNamedDefine: true, 31 | }, 32 | globalObject: "this", 33 | }, 34 | // Enable sourcemaps for debugging webpack's output. 35 | devtool: "source-map", 36 | mode: "production", 37 | }; 38 | -------------------------------------------------------------------------------- /amazon-location-route-planner/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # ignore package-lock.json because it's managed at the project root level 27 | package-lock.json -------------------------------------------------------------------------------- /amazon-location-route-planner/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] 3 | } 4 | -------------------------------------------------------------------------------- /amazon-location-route-planner/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Amazon Location Route Planner 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /amazon-location-route-planner/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amazon-location-route-planner", 3 | "version": "1.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@aws-amplify/core": "^5.0.16", 12 | "@aws-sdk/client-cognito-identity": "^3.282.0", 13 | "@aws-sdk/client-location": "^3.282.0", 14 | "@aws-sdk/credential-provider-cognito-identity": "^3.282.0", 15 | "@headlessui/vue": "^1.7.12", 16 | "@heroicons/vue": "^2.0.16", 17 | "@tailwindcss/forms": "^0.5.3", 18 | "@turf/helpers": "^6.5.0", 19 | "maplibre-gl": "^2.4.0", 20 | "vue": "^3.2.45" 21 | }, 22 | "devDependencies": { 23 | "@vitejs/plugin-vue": "^4.0.0", 24 | "autoprefixer": "^10.4.13", 25 | "postcss": "^8.4.21", 26 | "tailwindcss": "^3.2.7", 27 | "vite": "^4.1.5" 28 | }, 29 | "author": { 30 | "name": "Abraham Poorazizi" 31 | }, 32 | "license": "MIT-0" 33 | } -------------------------------------------------------------------------------- /amazon-location-route-planner/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /amazon-location-route-planner/src/components/RouteSummary.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /amazon-location-route-planner/src/config.js: -------------------------------------------------------------------------------- 1 | const identityPoolId = "IDENTITY_POOL_ID"; 2 | const mapName = "TruckDemoMap"; 3 | const routeCalculatorName = "TruckDemoRouteCalculator"; 4 | 5 | export { identityPoolId, mapName, routeCalculatorName }; 6 | -------------------------------------------------------------------------------- /amazon-location-route-planner/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import './style.css' 3 | import App from './App.vue' 4 | 5 | createApp(App).mount('#app') 6 | -------------------------------------------------------------------------------- /amazon-location-route-planner/src/style.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /amazon-location-route-planner/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /amazon-location-route-planner/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import vue from "@vitejs/plugin-vue"; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | "./runtimeConfig": "./runtimeConfig.browser", 10 | }, 11 | }, 12 | server: { 13 | host: true, 14 | port: 8080, 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amplify-ui-geo-explore", 3 | "version": "1.5.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@aws-amplify/ui-react": "^5.0.4", 12 | "@aws-amplify/ui-react-geo": "^1.0.1", 13 | "aws-amplify": "^5.3.12", 14 | "maplibre-gl-draw": "^1.5.7", 15 | "react": "^18.2.0", 16 | "react-dom": "^18.2.0" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^18.2.14", 20 | "@types/react-dom": "^18.2.6", 21 | "@vitejs/plugin-react": "^4.0.1", 22 | "eslint": "^8.44.0", 23 | "eslint-plugin-react": "^7.32.2", 24 | "eslint-plugin-react-hooks": "^4.6.0", 25 | "eslint-plugin-react-refresh": "^0.4.1", 26 | "vite": "^4.5.2" 27 | }, 28 | "license": "MIT-0" 29 | } 30 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /amplify-ui-geo-explore/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/amplify-ui-geo-explore/public/favicon.ico -------------------------------------------------------------------------------- /amplify-ui-geo-explore/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/amplify-ui-geo-explore/screenshot.png -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/InfoBox.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Card } from "@aws-amplify/ui-react"; 5 | import styles from "./InfoBox.module.css"; 6 | 7 | // Information box 8 | const InfoBox = ({ header, children }) => { 9 | return ( 10 |
11 | 12 |

{header}

13 |
{children}
14 |
15 |
16 | ); 17 | }; 18 | 19 | export default InfoBox; 20 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/InfoBox.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .wrapper { 7 | position: absolute; 8 | bottom: 2rem; 9 | left: 2rem; 10 | width: 26rem; 11 | z-index: 3; 12 | user-select: text; 13 | } 14 | 15 | .header { 16 | margin: 0 0 0.5rem 0; 17 | } 18 | 19 | .content { 20 | font-size: 1rem; 21 | } 22 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/LocationMarkers.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .marker { 7 | z-index: 1; 8 | } 9 | 10 | .popup { 11 | z-index: 2; 12 | cursor: text; 13 | user-select: text; 14 | } 15 | 16 | .popup__content { 17 | padding: 0 0.5rem; 18 | } 19 | 20 | .popup__title { 21 | margin-top: 0.5rem; 22 | margin-bottom: 0.5rem; 23 | font-size: 1rem; 24 | font-weight: bold; 25 | } 26 | 27 | .popup__coordinates { 28 | margin-top: 0.5rem; 29 | font-style: italic; 30 | } 31 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/Marker.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export class Marker { 5 | constructor(coordinates, index) { 6 | this.setCoordinates(coordinates); 7 | this.longitude = coordinates?.lng; 8 | this.latitude = coordinates?.lat; 9 | this.index = index; 10 | this.color = "#3eb0ce"; 11 | } 12 | 13 | setCoordinates(coordinates) { 14 | this.coordinates = [coordinates?.lng, coordinates?.lat]; 15 | } 16 | 17 | getPopupTitle(totalMarkersLength) { 18 | if (this.index === 0) { 19 | return "Departure Position"; 20 | } else if (this.index === totalMarkersLength - 1) { 21 | return "Destination Position"; 22 | } else { 23 | return "Waypoint Position"; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/Panel.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Card } from "@aws-amplify/ui-react"; 5 | import styles from "./Panel.module.css"; 6 | 7 | // Popup panel 8 | const Panel = ({ header, footer, children }) => { 9 | return ( 10 |
11 | 12 |
{header}
13 |
{children}
14 |
{footer}
15 |
16 |
17 | ); 18 | }; 19 | 20 | export default Panel; 21 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/Panel.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .wrapper { 7 | position: absolute; 8 | top: 2rem; 9 | right: 2rem; 10 | width: 24rem; 11 | z-index: 3; 12 | user-select: text; 13 | } 14 | 15 | /* Increase specificity to override Amplify UI card style */ 16 | .wrapper > .card { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: space-between; 20 | min-height: 28rem; 21 | } 22 | 23 | .header { 24 | margin-bottom: 1.5rem; 25 | } 26 | 27 | .footer { 28 | display: flex; 29 | justify-content: space-between; 30 | margin-top: 1.5rem; 31 | } 32 | 33 | .content { 34 | display: flex; 35 | flex-direction: column; 36 | flex-grow: 1; 37 | } 38 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/Spinner.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import styles from "./Spinner.module.css"; 5 | 6 | const Spinner = () => { 7 | return ( 8 |
9 |
10 |
11 | ); 12 | }; 13 | 14 | export default Spinner; 15 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/common/Spinner.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .wrapper { 7 | display: flex; 8 | justify-content: space-around; 9 | align-items: center; 10 | flex-grow: 1; 11 | } 12 | 13 | .spinner { 14 | width: 50px; 15 | height: 50px; 16 | border: 3px solid #e0e0e0; 17 | border-top: 3px solid #535353; 18 | border-radius: 50%; 19 | animation: spin 1s linear infinite; 20 | } 21 | 22 | @keyframes spin { 23 | 0% { transform: rotate(0deg); } 24 | 100% { transform: rotate(360deg); } 25 | } 26 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/geofences/GeofencesPanel.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .header { 7 | display: flex; 8 | justify-content: space-between; 9 | } 10 | 11 | .collection { 12 | margin-bottom: 0.5rem; 13 | font-size: 0.9rem; 14 | font-weight: 500; 15 | } 16 | 17 | .empty { 18 | margin-top: auto; 19 | margin-bottom: auto; 20 | text-align: center; 21 | color: #6d6d6d; 22 | } 23 | 24 | .empty__header { 25 | font-size: 1rem; 26 | font-weight: 500; 27 | } 28 | 29 | .empty__body { 30 | margin-top: 0.5rem; 31 | font-size: 0.8rem; 32 | } 33 | 34 | .max { 35 | margin-top: 0.25rem; 36 | text-align: center; 37 | } 38 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/places/PlacesLayer.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .popup { 7 | z-index: 2; 8 | cursor: text; 9 | user-select: text; 10 | } 11 | 12 | .popup__content { 13 | padding: 0 0.5rem; 14 | } 15 | 16 | .popup__title { 17 | margin-top: 0.5rem; 18 | margin-bottom: 0.5rem; 19 | font-size: 1rem; 20 | font-weight: bold; 21 | } 22 | 23 | .popup__coordinates { 24 | margin-top: 0.5rem; 25 | font-style: italic; 26 | } 27 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/routes/CalculatedRoutePoints.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .point { 7 | height: 1rem; 8 | width: 1rem; 9 | } 10 | 11 | .popup { 12 | z-index: 2; 13 | cursor: text; 14 | user-select: text; 15 | } 16 | 17 | .popup__content { 18 | padding: 0 0.5rem; 19 | } 20 | 21 | .popup__title { 22 | margin-top: 0.5rem; 23 | margin-bottom: 0.5rem; 24 | font-size: 1rem; 25 | font-weight: bold; 26 | } 27 | 28 | .popup__coordinates { 29 | margin-top: 0.5rem; 30 | font-style: italic; 31 | } 32 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/routes/RoutesPanel.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .field { 7 | display: flex; 8 | flex-direction: column; 9 | margin-bottom: 1rem; 10 | } 11 | 12 | .field__label { 13 | font-size: 1rem; 14 | color: #304050; 15 | } 16 | 17 | .field__coordinates { 18 | margin: 0.5rem 0 0.15rem 0; 19 | font-size: 0.8rem; 20 | font-weight: 500; 21 | } 22 | 23 | .field__input { 24 | margin: 0.5rem 0 0.15rem 0; 25 | max-width: 10rem; 26 | border-style: solid; 27 | border-color: #858585; 28 | padding: 0.25rem 1rem; 29 | text-align: center; 30 | font-size: 0.9rem; 31 | } 32 | 33 | .field__input:disabled { 34 | border-color: #d1d1d1; 35 | background: #d1d1d1; 36 | } 37 | 38 | .error { 39 | color: red; 40 | } 41 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/trackers/Devices.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .marker { 7 | z-index: 1; 8 | } 9 | 10 | .popup { 11 | z-index: 2; 12 | cursor: text; 13 | user-select: text; 14 | } 15 | 16 | .popup__content { 17 | padding: 0 0.5rem; 18 | } 19 | 20 | .popup__title { 21 | margin-top: 0.5rem; 22 | margin-bottom: 0.5rem; 23 | font-size: 1rem; 24 | font-weight: 500; 25 | } 26 | 27 | .popup__subtitle { 28 | font-size: 0.85rem; 29 | font-weight: 600; 30 | } 31 | 32 | .popup__coordinates { 33 | margin-top: 0.5rem; 34 | font-style: italic; 35 | } 36 | 37 | .popup__item { 38 | margin-top: 0.5rem; 39 | } 40 | 41 | .popup__button { 42 | margin-top: 0.25rem; 43 | } 44 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/components/trackers/TrackersPanel.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .field { 7 | display: flex; 8 | flex-direction: column; 9 | margin-bottom: 1rem; 10 | } 11 | 12 | .field__label { 13 | font-size: 1rem; 14 | color: #304050; 15 | } 16 | 17 | .field__value { 18 | margin: 0.5rem 0 0.15rem 0; 19 | font-size: 0.8rem; 20 | font-weight: 500; 21 | color: #606060; 22 | } 23 | 24 | .information { 25 | margin-top: auto; 26 | padding-top: 1rem; 27 | } 28 | 29 | .refresh { 30 | padding-top: 0.25rem; 31 | } 32 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/constants.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export const ROUTES_PANEL = "ROUTES_PANEL"; 5 | export const GEOFENCES_PANEL = "GEOFENCES_PANEL"; 6 | export const TRACKERS_PANEL = "TRACKERS_PANEL"; 7 | export const GEOFENCE_DRAWING_MODE = "GEOFENCE_DRAWING_MODE"; 8 | export const DEVICE_POSITION_HISTORY_VIEWER = "DEVICE_POSITION_HISTORY_VIEWER"; 9 | export const MAP_CONTAINER = "map-view"; 10 | export const PIN_ICON_SIZE = 45; 11 | export const VEHICLE_ICON_SIZE = 24; 12 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | body { 7 | margin: 0; 8 | font-family: sans-serif; 9 | } 10 | 11 | .mapboxgl-ctrl-top-left .mapboxgl-ctrl, .maplibregl-ctrl-top-left .maplibregl-ctrl { 12 | min-width: 360px; 13 | } 14 | 15 | .crosshair-cursor canvas { 16 | cursor: crosshair; 17 | } 18 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/main.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from "react"; 5 | import { createRoot } from "react-dom/client"; 6 | import App from "./App"; 7 | 8 | createRoot(document.getElementById("root")).render( 9 | 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/src/theme.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export const theme = { 5 | name: "amazon-location-service", 6 | tokens: { 7 | components: { 8 | button: { 9 | backgroundColor: { value: "{colors.white.value}" }, 10 | _focus: { 11 | boxShadow: { value: "none" }, 12 | borderColor: { value: "{components.fieldcontrol.borderColor.value}" }, 13 | backgroundColor: { value: "white" }, 14 | }, 15 | _hover: { 16 | backgroundColor: { value: "{colors.white.value}" }, 17 | }, 18 | primary: { 19 | _focus: { 20 | boxShadow: { value: "none" }, 21 | backgroundColor: { value: "{colors.brand.primary.80.value}" }, 22 | }, 23 | }, 24 | }, 25 | }, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /amplify-ui-geo-explore/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | build: { 9 | outDir: 'build' 10 | }, 11 | server: { 12 | host: true, 13 | port: 8080, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /android-quick-start/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/java/com/amazon/location/android/quickstart/AndroidQuickstartApp.kt: -------------------------------------------------------------------------------- 1 | package com.amazon.location.android.quickstart 2 | 3 | import android.app.Application 4 | import android.util.Log 5 | import com.amplifyframework.AmplifyException 6 | import com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin 7 | import com.amplifyframework.core.Amplify 8 | import com.amplifyframework.geo.location.AWSLocationGeoPlugin 9 | 10 | class AndroidQuickstartApp : Application() { 11 | override fun onCreate() { 12 | super.onCreate() 13 | 14 | try { 15 | Amplify.addPlugin(AWSCognitoAuthPlugin()) 16 | Amplify.addPlugin(AWSLocationGeoPlugin()) 17 | Amplify.configure(applicationContext) 18 | Log.i("AndroidQuickStart", "Initialized Amplify") 19 | } catch (error: AmplifyException) { 20 | Log.e("AndroidQuickStart", "Could not initialize Amplify", error) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/drawable/red_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/drawable/red_marker.png -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AmazonLocationAndroidQuickStart 3 | 4 | -------------------------------------------------------------------------------- /android-quick-start/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | -------------------------------------------------------------------------------- /android-quick-start/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath "com.android.tools.build:gradle:7.0.4" 9 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | task clean(type: Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /android-quick-start/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android-quick-start/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Feb 15 14:16:21 PST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android-quick-start/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/android-quick-start/screenshot.png -------------------------------------------------------------------------------- /android-quick-start/settings.gradle: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | rootProject.name = "AmazonLocationAndroidQuickStart" 9 | include ':app' 10 | -------------------------------------------------------------------------------- /athena-udfs/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | packaged.yaml 3 | .classpath 4 | .env 5 | .envrc 6 | .project 7 | .settings/ 8 | .vscode/ 9 | -------------------------------------------------------------------------------- /athena-udfs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /athena-udfs/Makefile: -------------------------------------------------------------------------------- 1 | default: target/athena-udfs-1.0-SNAPSHOT.jar 2 | 3 | AWS_REGION: 4 | @test "${$@}" || (echo "$@ is undefined" && false) 5 | 6 | S3_BUCKET: 7 | @test "${$@}" || (echo "$@ is undefined" && false) 8 | 9 | target/athena-udfs-1.0-SNAPSHOT.jar: pom.xml $(shell find src -type f) 10 | mvn clean install -Dpublishing=true 11 | 12 | packaged.yaml: amazon-location-udfs.yaml target/athena-udfs-1.0-SNAPSHOT.jar S3_BUCKET AWS_REGION 13 | sam package --template-file $< --output-template-file $@ --s3-bucket ${S3_BUCKET} --region ${AWS_REGION} 14 | 15 | publish: packaged.yaml AWS_REGION 16 | sam publish --template $< --region ${AWS_REGION} 17 | 18 | .PHONY: AWS_REGION S3_BUCKET publish 19 | -------------------------------------------------------------------------------- /aurora-udfs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /aurora-udfs/search-place-index-for-position/lambda_function.py: -------------------------------------------------------------------------------- 1 | from os import environ 2 | 3 | import boto3 4 | from botocore.config import Config 5 | 6 | # load the place index name from the environment, falling back to a default 7 | PLACE_INDEX_NAME = environ.get("PLACE_INDEX_NAME", "AuroraUDFs") 8 | 9 | location = boto3.client("location", 10 | config=Config(user_agent="Amazon Aurora PostgreSQL")) 11 | 12 | """ 13 | This Lambda function receives a payload from Amazon Aurora and translates it to 14 | an Amazon Location `SearchPlaceIndex` call and returns the results as-is, to be 15 | post-processed by a PL/pgSQL function. 16 | """ 17 | def lambda_handler(event, context): 18 | kwargs = {} 19 | 20 | if event.get("maxResults") is not None: 21 | kwargs["MaxResults"] = event["maxResults"] 22 | 23 | return location.search_place_index_for_position( 24 | IndexName=PLACE_INDEX_NAME, 25 | Position=event["position"], 26 | **kwargs)["Results"] 27 | -------------------------------------------------------------------------------- /create-custom-map-style/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | module.exports = { 4 | "env": { 5 | "browser": true, 6 | "es2021": true 7 | }, 8 | "extends": [ 9 | "eslint:recommended", 10 | "plugin:react/recommended" 11 | ], 12 | "parserOptions": { 13 | "ecmaFeatures": { 14 | "jsx": true 15 | }, 16 | "ecmaVersion": 12, 17 | "sourceType": "module" 18 | }, 19 | "plugins": [ 20 | "react" 21 | ], 22 | "rules": { 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /create-custom-map-style/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "createcustommapstyle", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "react", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "build", 10 | "BuildCommand": "npm run-script build", 11 | "StartCommand": "npm run-script start" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /create-custom-map-style/amplify/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Amplify CLI 2 | This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli). 3 | 4 | Helpful resources: 5 | - Amplify documentation: https://docs.amplify.aws 6 | - Amplify CLI documentation: https://docs.amplify.aws/cli 7 | - More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files 8 | - Join Amplify's community: https://amplify.aws/community/ 9 | -------------------------------------------------------------------------------- /create-custom-map-style/amplify/backend/geo/customStyleMap/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /create-custom-map-style/amplify/backend/geo/customStyleMap/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "customStyleMap", 9 | "mapStyle": "VectorEsriStreets", 10 | "isDefault": true 11 | } -------------------------------------------------------------------------------- /create-custom-map-style/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /create-custom-map-style/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "createcustommapstyle6210c835": { 4 | "IdentityPoolId": "string", 5 | "IdentityPoolName": "string", 6 | "UserPoolId": "string", 7 | "UserPoolArn": "string", 8 | "UserPoolName": "string", 9 | "AppClientIDWeb": "string", 10 | "AppClientID": "string" 11 | } 12 | }, 13 | "geo": { 14 | "customStyleMap": { 15 | "Name": "string", 16 | "Style": "string", 17 | "Region": "string", 18 | "Arn": "string" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /create-custom-map-style/amplify/hooks/README.md: -------------------------------------------------------------------------------- 1 | # Command Hooks 2 | 3 | Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc. 4 | 5 | To get started, add your script files based on the expected naming convention in this directory. 6 | 7 | Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks 8 | -------------------------------------------------------------------------------- /create-custom-map-style/amplify/team-provider-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "dev": { 3 | "awscloudformation": { 4 | "AuthRoleName": "amplify-createcustommapstyle-dev-22658-authRole", 5 | "UnauthRoleArn": "arn:aws:iam::762023485231:role/amplify-createcustommapstyle-dev-22658-unauthRole", 6 | "AuthRoleArn": "arn:aws:iam::762023485231:role/amplify-createcustommapstyle-dev-22658-authRole", 7 | "Region": "eu-west-1", 8 | "DeploymentBucketName": "amplify-createcustommapstyle-dev-22658-deployment", 9 | "UnauthRoleName": "amplify-createcustommapstyle-dev-22658-unauthRole", 10 | "StackName": "amplify-createcustommapstyle-dev-22658", 11 | "StackId": "arn:aws:cloudformation:eu-west-1:762023485231:stack/amplify-createcustommapstyle-dev-22658/7d9ab440-1067-11ed-bcc2-069369b10f7f", 12 | "AmplifyAppId": "d3tt52b5y66y3" 13 | }, 14 | "categories": { 15 | "auth": { 16 | "createcustommapstyle6210c835": {}, 17 | "true": {} 18 | } 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /create-custom-map-style/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /create-custom-map-style/media/AppSkeleton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/AppSkeleton.png -------------------------------------------------------------------------------- /create-custom-map-style/media/BaseMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/BaseMap.png -------------------------------------------------------------------------------- /create-custom-map-style/media/CRA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/CRA.png -------------------------------------------------------------------------------- /create-custom-map-style/media/ChangesAppear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/ChangesAppear.png -------------------------------------------------------------------------------- /create-custom-map-style/media/LayerAfter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/LayerAfter.png -------------------------------------------------------------------------------- /create-custom-map-style/media/LayerBefore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/LayerBefore.png -------------------------------------------------------------------------------- /create-custom-map-style/media/Login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/Login.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikDataSources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikDataSources.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikEmpty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikEmpty.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikExport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikExport.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikJSONEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikJSONEditor.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikLandNotIce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikLandNotIce.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikLayers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikLayers.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikNewSource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikNewSource.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikOpen.png -------------------------------------------------------------------------------- /create-custom-map-style/media/MaputnikOpenStyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/MaputnikOpenStyle.png -------------------------------------------------------------------------------- /create-custom-map-style/media/OAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/media/OAI.png -------------------------------------------------------------------------------- /create-custom-map-style/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-custom-map-style", 3 | "version": "1.0.0", 4 | "dependencies": { 5 | "@aws-amplify/ui-react": "^5.0.0", 6 | "aws-amplify": "^5.2.5", 7 | "maplibre-gl-js-amplify": "^3.1.0", 8 | "react": "^18.2.0", 9 | "react-dom": "^18.2.0" 10 | }, 11 | "scripts": { 12 | "start": "vite", 13 | "build": "vite build", 14 | "preview": "vite preview" 15 | }, 16 | "devDependencies": { 17 | "@types/react": "^18.2.9", 18 | "@types/react-dom": "^18.2.4", 19 | "@vitejs/plugin-react": "^4.0.0", 20 | "vite": "^4.3.9" 21 | }, 22 | "license": "MIT-0" 23 | } -------------------------------------------------------------------------------- /create-custom-map-style/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /create-custom-map-style/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/create-custom-map-style/public/favicon.ico -------------------------------------------------------------------------------- /create-custom-map-style/tileserver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tileserver", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "tessera": "^0.15.3", 14 | "tilelive-aws": "^3.2.0" 15 | } 16 | } -------------------------------------------------------------------------------- /create-custom-map-style/tileserver/serveSpritesGlyphs.sh: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # SPDX-License-Identifier: MIT-0 3 | #!/usr/bin/env bash 4 | 5 | npx http-server ./ -p 8088 6 | -------------------------------------------------------------------------------- /create-custom-map-style/tileserver/startServer.sh: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # SPDX-License-Identifier: MIT-0 3 | #!/usr/bin/env bash 4 | 5 | node_modules/.bin/tessera -r $(pwd)/node_modules/tilelive-aws/tilelive-aws.js aws:///CreateCustomMapStyle 6 | -------------------------------------------------------------------------------- /create-custom-map-style/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /geocode-udf-lambda-aurora/Lambda/lambda_function.py: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # SPDX-License-Identifier: MIT-0 3 | 4 | import logging 5 | import time 6 | from geocode import * 7 | 8 | logger = logging.getLogger() 9 | logger.setLevel(logging.INFO) 10 | 11 | def lambda_handler(event, context): 12 | 13 | try: 14 | logger.debug (event) 15 | 16 | t1 = time.time() 17 | response = geocode_address(event["address_line"], event["municipality_name"], event["state_code"], event["post_code"], event["country_code"]) 18 | t2 = time.time() 19 | logger.debug ("Time: %.3f" % (t2 - t1)) 20 | 21 | except Exception as e: 22 | logger.exception (e) 23 | response ={ 24 | "Exception": str(e) 25 | } 26 | 27 | return response 28 | -------------------------------------------------------------------------------- /geocode-udf-lambda-aurora/UDF/CreateFunction.sql: -------------------------------------------------------------------------------- 1 | -- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -- SPDX-License-Identifier: MIT-0 3 | 4 | CREATE OR REPLACE FUNCTION f_geocode_address(p_address_line varchar(85), p_municipality_name varchar(60), p_state_code varchar(2), p_post_code varchar(10), p_country_code varchar(3)) 5 | RETURNS varchar(200) 6 | LANGUAGE plpgsql 7 | AS $function$ 8 | declare 9 | result varchar(200); 10 | begin 11 | SELECT payload into result 12 | FROM aws_lambda.invoke(aws_commons.create_lambda_function_arn(''), 13 | concat('{"address_line":"',p_address_line,'", 14 | "municipality_name":"',p_municipality_name,'", 15 | "state_code":"',p_state_code,'", 16 | "post_code":"',p_post_code,'", 17 | "country_code":"',p_country_code,'"}')::json); 18 | 19 | return result; 20 | end; 21 | $function$ -------------------------------------------------------------------------------- /geocode-udf-lambda-aurora/UDF/CreateTable.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE customer_address ( 2 | customer_id int8 NOT NULL, 3 | address_line varchar(65) NULL, 4 | municipality_name varchar(30) NULL, 5 | state_code varchar(2) NULL, 6 | post_code varchar(10) NULL, 7 | country_code varchar(3) NULL, 8 | longitude float8 NULL, 9 | latitude float8 NULL, 10 | geocode_result jsonb NULL, 11 | address_status varchar(10) 12 | ); 13 | CREATE UNIQUE INDEX customer_address_customer_id 14 | ON customer_address 15 | USING btree (customer_id); -------------------------------------------------------------------------------- /geocode-udf-lambda-redshift/UDF/CreateFunction.sql: -------------------------------------------------------------------------------- 1 | -- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -- SPDX-License-Identifier: MIT-0 3 | 4 | CREATE OR REPLACE EXTERNAL FUNCTION public.f_geocode_address(VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) 5 | RETURNS VARCHAR 6 | STABLE 7 | LAMBDA '' 8 | MAX_BATCH_ROWS 9000 9 | IAM_ROLE ''; 10 | -------------------------------------------------------------------------------- /geocode-udf-lambda-redshift/UDF/CreateTable.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE customer_address 2 | ( 3 | customer_id INTEGER NOT NULL, 4 | address_line VARCHAR(65), 5 | municipality_name VARCHAR(30), 6 | state_code VARCHAR(2), 7 | post_code VARCHAR(10), 8 | longitude DOUBLE PRECISION, 9 | latitude DOUBLE PRECISION, 10 | country_code VARCHAR(3), 11 | geocode_result VARCHAR(200), 12 | address_status VARCHAR(10), 13 | PRIMARY KEY (customer_id) 14 | ) -------------------------------------------------------------------------------- /geofence-utils/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | -------------------------------------------------------------------------------- /leaflet-amplify/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "leafletstarter", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "none", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "dist", 10 | "BuildCommand": "npm run build", 11 | "StartCommand": "npm run dev" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /leaflet-amplify/amplify/backend/geo/mapcf4954c3/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /leaflet-amplify/amplify/backend/geo/mapcf4954c3/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "mapcf4954c3", 9 | "mapStyle": "VectorHereExplore", 10 | "isDefault": true 11 | } -------------------------------------------------------------------------------- /leaflet-amplify/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /leaflet-amplify/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "leafletstarter3981405c": { 4 | "IdentityPoolId": "string", 5 | "IdentityPoolName": "string", 6 | "UserPoolId": "string", 7 | "UserPoolArn": "string", 8 | "UserPoolName": "string", 9 | "AppClientIDWeb": "string", 10 | "AppClientID": "string" 11 | } 12 | }, 13 | "geo": { 14 | "mapcf4954c3": { 15 | "Name": "string", 16 | "Style": "string", 17 | "Region": "string", 18 | "Arn": "string" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /leaflet-amplify/img/README01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/img/README01.gif -------------------------------------------------------------------------------- /leaflet-amplify/img/README02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/img/README02.png -------------------------------------------------------------------------------- /leaflet-amplify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Leaflet Amplify x Amazon Location Service 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /leaflet-amplify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-amplify", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "vite", 6 | "build": "tsc && vite build", 7 | "preview": "vite preview" 8 | }, 9 | "devDependencies": { 10 | "typescript": "^4.8.4", 11 | "vite": "^3.2.7" 12 | }, 13 | "dependencies": { 14 | "@maplibre/maplibre-gl-leaflet": "^0.0.17", 15 | "@types/leaflet": "^1.8.0", 16 | "aws-amplify": "^4.3.38", 17 | "leaflet": "^1.9.2", 18 | "maplibre-gl": "^2.4.0", 19 | "maplibre-gl-js-amplify": "^2.1.0" 20 | }, 21 | "license": "MIT-0" 22 | } -------------------------------------------------------------------------------- /leaflet-amplify/public/img/icon/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/public/img/icon/layers-2x.png -------------------------------------------------------------------------------- /leaflet-amplify/public/img/icon/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/public/img/icon/layers.png -------------------------------------------------------------------------------- /leaflet-amplify/public/img/icon/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/public/img/icon/marker-icon-2x.png -------------------------------------------------------------------------------- /leaflet-amplify/public/img/icon/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/public/img/icon/marker-icon.png -------------------------------------------------------------------------------- /leaflet-amplify/public/img/icon/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-amplify/public/img/icon/marker-shadow.png -------------------------------------------------------------------------------- /leaflet-amplify/src/style.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | padding: 0; 5 | margin: 0; 6 | } 7 | 8 | #map { 9 | z-index: 0; 10 | height: 100%; 11 | } -------------------------------------------------------------------------------- /leaflet-amplify/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /leaflet-amplify/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "allowJs": true, 8 | "moduleResolution": "Node", 9 | "strict": true, 10 | "sourceMap": true, 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "esModuleInterop": true, 14 | "noEmit": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "noImplicitReturns": true, 18 | "skipLibCheck": true 19 | }, 20 | "include": ["src"] 21 | } -------------------------------------------------------------------------------- /leaflet-amplify/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | resolve: { 5 | alias: { 6 | './runtimeConfig': './runtimeConfig.browser', 7 | }, 8 | }, 9 | define: { 10 | 'window.global': {} 11 | }, 12 | build: { 13 | target: 'esnext', 14 | commonjsOptions: { 15 | ignoreDynamicRequires: true 16 | } 17 | }, 18 | server: { 19 | host: true, 20 | port: 8080, 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "leafletvue", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "vue", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "build", 10 | "BuildCommand": "npm run build", 11 | "StartCommand": "npm run serve" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /leaflet-vue-amplify/amplify/backend/geo/leafletvue/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "leafletvue", 9 | "mapStyle": "VectorHereBerlin", 10 | "pricingPlan": "RequestBasedUsage", 11 | "isDefault": true 12 | } -------------------------------------------------------------------------------- /leaflet-vue-amplify/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /leaflet-vue-amplify/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "leafletvue022beae3": { 4 | "IdentityPoolId": "string", 5 | "IdentityPoolName": "string", 6 | "UserPoolId": "string", 7 | "UserPoolArn": "string", 8 | "UserPoolName": "string", 9 | "AppClientIDWeb": "string", 10 | "AppClientID": "string" 11 | } 12 | }, 13 | "geo": { 14 | "leafletvue": { 15 | "Name": "string", 16 | "Style": "string" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /leaflet-vue-amplify/img/README.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-vue-amplify/img/README.png -------------------------------------------------------------------------------- /leaflet-vue-amplify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-vue-amplify", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "vite", 6 | "build": "vite build", 7 | "preview": "vite preview --port 5050" 8 | }, 9 | "dependencies": { 10 | "@maplibre/maplibre-gl-leaflet": "^0.0.15", 11 | "aws-amplify": "^4.3.14", 12 | "leaflet": "^1.7.1", 13 | "maplibre-gl": "^1.15.2", 14 | "maplibre-gl-js-amplify": "^1.2.3", 15 | "vue": "^3.2.29", 16 | "vue-router": "^4.0.12" 17 | }, 18 | "devDependencies": { 19 | "@vitejs/plugin-vue": "^2.1.0", 20 | "vite": "^2.9.16" 21 | }, 22 | "license": "MIT-0" 23 | } -------------------------------------------------------------------------------- /leaflet-vue-amplify/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/leaflet-vue-amplify/public/favicon.ico -------------------------------------------------------------------------------- /leaflet-vue-amplify/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/src/assets/base.css: -------------------------------------------------------------------------------- 1 | #app { 2 | font-family: 'Avenir', Helvetica, Arial, sans-serif; 3 | -webkit-font-smoothing: antialiased; 4 | -moz-osx-font-smoothing: grayscale; 5 | text-align: center; 6 | color: #2c3e50; 7 | } -------------------------------------------------------------------------------- /leaflet-vue-amplify/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import 'leaflet/dist/leaflet.css' 5 | import 'maplibre-gl/dist/maplibre-gl.css' 6 | 7 | import Amplify from 'aws-amplify'; 8 | import awsconfig from './aws-exports'; 9 | Amplify.configure(awsconfig); 10 | 11 | const app = createApp(App) 12 | 13 | app.use(router) 14 | 15 | app.mount('#app') 16 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import HomeView from '../views/HomeView.vue' 3 | 4 | const router = createRouter({ 5 | history: createWebHistory(import.meta.env.BASE_URL), 6 | routes: [ 7 | { 8 | path: '/', 9 | name: 'home', 10 | component: HomeView 11 | } 12 | ] 13 | }) 14 | 15 | export default router 16 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /leaflet-vue-amplify/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | server: { 15 | host: true, 16 | port: 8080, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /maplibre-gl-js-amplify-marker-tooltip-example/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /maplibre-gl-js-amplify/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /maplibre-gl-js-quick-start/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /maplibre-gl-js-quick-start/main.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | font-family: Arial, Helvetica, sans-serif; 4 | } 5 | 6 | body { 7 | margin: 0; 8 | } 9 | 10 | header { 11 | background: #000000; 12 | padding: 0.5rem; 13 | } 14 | 15 | h1 { 16 | margin: 0; 17 | text-align: center; 18 | font-size: 1.5rem; 19 | color: #ffffff; 20 | } 21 | 22 | main { 23 | display: flex; 24 | min-height: calc(100vh - 94px); 25 | } 26 | 27 | #map { 28 | flex: 1; 29 | } 30 | 31 | aside { 32 | overflow-y: auto; 33 | flex: 0 0 30%; 34 | max-height: calc(100vh - 94px); 35 | box-shadow: 0 1px 1px 0 #001c244d, 1px 1px 1px 0 #001c2426, -1px 1px 1px 0 #001c2426; 36 | background: #f9f9f9; 37 | padding: 1rem; 38 | } 39 | 40 | h2 { 41 | margin: 0; 42 | } 43 | 44 | pre { 45 | white-space: pre-wrap; 46 | font-family: monospace; 47 | color: #16191f; 48 | } 49 | 50 | footer { 51 | background: #000000; 52 | padding: 1rem; 53 | color: #ffffff; 54 | } 55 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "maplibreglvue", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "vue", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "dist", 10 | "BuildCommand": "npm run-script build", 11 | "StartCommand": "npm run-script serve" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esridarkgray/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esridarkgray/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esridarkgray", 9 | "mapStyle": "VectorEsriDarkGrayCanvas", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esriimagery/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esriimagery/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esriimagery", 9 | "mapStyle": "RasterEsriImagery", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrilight/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrilight/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esrilight", 9 | "mapStyle": "VectorEsriTopographic", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrilightgray/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrilightgray/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esrilightgray", 9 | "mapStyle": "VectorEsriLightGrayCanvas", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrinavigation/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esrinavigation/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esrinavigation", 9 | "mapStyle": "VectorEsriNavigation", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esristreet/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/esristreet/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "esristreet", 9 | "mapStyle": "VectorEsriStreets", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/hereexplore/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/hereexplore/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "hereexplore", 9 | "mapStyle": "VectorHereExplore", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/heretruck/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/heretruck/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "heretruck", 9 | "mapStyle": "VectorHereExploreTruck", 10 | "isDefault": false 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/opendatastandardlight/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/opendatastandardlight/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "opendatastandardlight", 9 | "mapStyle": "VectorOpenDataStandardLight", 10 | "isDefault": true 11 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/placeindex/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/geo/placeindex/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "indexName": "placeIndex", 9 | "dataProvider": "Here", 10 | "dataSourceIntendedUse": "SingleUse", 11 | "isDefault": true 12 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"11.0.3\",\"stackType\":\"hosting-amplifyhosting\",\"metadata\":{}}", 4 | "Parameters": { 5 | "env": { 6 | "Type": "String" 7 | }, 8 | "appId": { 9 | "Type": "String" 10 | }, 11 | "type": { 12 | "Type": "String" 13 | } 14 | }, 15 | "Conditions": { 16 | "isManual": { 17 | "Fn::Equals": [ 18 | { 19 | "Ref": "type" 20 | }, 21 | "manual" 22 | ] 23 | } 24 | }, 25 | "Resources": { 26 | "AmplifyBranch": { 27 | "Condition": "isManual", 28 | "Type": "AWS::Amplify::Branch", 29 | "Properties": { 30 | "BranchName": { 31 | "Ref": "env" 32 | }, 33 | "AppId": { 34 | "Ref": "appId" 35 | } 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/image/README.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-gl-js-vue-amplify-compare-maps/image/README.png -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "maplibre-gl-js-vue-amplify-compare-maps", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "@aws-amplify/ui-vue": "^2.4.12", 12 | "aws-amplify": "^4.3.27", 13 | "maplibre-gl": "^2.1.9", 14 | "maplibre-gl-js-amplify": "^2.0.2", 15 | "vue": "^3.2.45", 16 | "vue-router": "^4.0.12" 17 | }, 18 | "devDependencies": { 19 | "@vitejs/plugin-vue": "^3.0.1", 20 | "vite": "^3.2.7" 21 | }, 22 | "license": "MIT-0" 23 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-gl-js-vue-amplify-compare-maps/public/favicon.ico -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/src/main.js: -------------------------------------------------------------------------------- 1 | import AmplifyVue from '@aws-amplify/ui-vue'; 2 | import '@aws-amplify/ui-vue/styles.css'; 3 | import '@maplibre/maplibre-gl-geocoder/dist/maplibre-gl-geocoder.css'; 4 | import { Amplify } from 'aws-amplify'; 5 | import 'maplibre-gl/dist/maplibre-gl.css'; 6 | import { createApp } from 'vue'; 7 | import App from './App.vue'; 8 | import awsconfig from './aws-exports'; 9 | 10 | Amplify.configure(awsconfig); 11 | 12 | const app = createApp(App); 13 | app.config.productionTip = false; 14 | app.use(AmplifyVue); 15 | app.mount('#app'); 16 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify-compare-maps/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'url'; 2 | 3 | import { defineConfig } from 'vite'; 4 | import vue from '@vitejs/plugin-vue'; 5 | 6 | export default defineConfig({ 7 | plugins: [vue()], 8 | resolve: { 9 | alias: { 10 | '@': fileURLToPath(new URL('./src', import.meta.url)), 11 | './runtimeConfig': './runtimeConfig.browser', 12 | }, 13 | }, 14 | server: { 15 | host: true, 16 | port: 8080, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "maplibrereact", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "react", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "build", 10 | "BuildCommand": "npm run-script build", 11 | "StartCommand": "npm run-script start" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/amplify/backend/geo/maplibrereact/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "maplibrereact", 9 | "mapStyle": "VectorEsriStreets", 10 | "pricingPlan": "RequestBasedUsage", 11 | "isDefault": true 12 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "maplibrereact022beae3": { 4 | "IdentityPoolId": "string", 5 | "IdentityPoolName": "string", 6 | "UserPoolId": "string", 7 | "UserPoolArn": "string", 8 | "UserPoolName": "string", 9 | "AppClientIDWeb": "string", 10 | "AppClientID": "string" 11 | } 12 | }, 13 | "geo": { 14 | "maplibrereact": { 15 | "Name": "string", 16 | "Style": "string" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/assets/base.css: -------------------------------------------------------------------------------- 1 | #app { 2 | font-family: 'Avenir', Helvetica, Arial, sans-serif; 3 | -webkit-font-smoothing: antialiased; 4 | -moz-osx-font-smoothing: grayscale; 5 | text-align: center; 6 | color: #2c3e50; 7 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/assets/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'url' 2 | 3 | import { defineConfig } from 'vite' 4 | import vue from '@vitejs/plugin-vue' 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | '@': fileURLToPath(new URL('./src', import.meta.url)) 12 | } 13 | } 14 | }) 15 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/img/README.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-gl-js-vue-amplify/img/README.png -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vite App 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "maplibre-gl-js-vue-amplify", 3 | "version": "0.2.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "aws-amplify": "^4.3.29", 12 | "maplibre-gl-js-amplify": "^2.0.2", 13 | "vue": "^3.2.37", 14 | "vue-router": "^4.1.3" 15 | }, 16 | "devDependencies": { 17 | "@vitejs/plugin-vue": "^3.0.1", 18 | "vite": "^3.2.7" 19 | }, 20 | "license": "MIT-0" 21 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-gl-js-vue-amplify/public/favicon.ico -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/assets/base.css: -------------------------------------------------------------------------------- 1 | #app { 2 | font-family: 'Avenir', Helvetica, Arial, sans-serif; 3 | -webkit-font-smoothing: antialiased; 4 | -moz-osx-font-smoothing: grayscale; 5 | text-align: center; 6 | color: #2c3e50; 7 | } -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/components/MapPane.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 33 | 34 | 40 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import App from './App.vue'; 3 | import router from './router'; 4 | import 'maplibre-gl/dist/maplibre-gl.css'; 5 | 6 | import Amplify from 'aws-amplify'; 7 | import awsconfig from './aws-exports'; 8 | Amplify.configure(awsconfig); 9 | 10 | const app = createApp(App); 11 | 12 | app.use(router); 13 | 14 | app.mount('#app'); 15 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import HomeView from '../views/HomeView.vue' 3 | 4 | const router = createRouter({ 5 | history: createWebHistory(import.meta.env.BASE_URL), 6 | routes: [ 7 | { 8 | path: '/', 9 | name: 'home', 10 | component: HomeView 11 | } 12 | ] 13 | }) 14 | 15 | export default router 16 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /maplibre-gl-js-vue-amplify/vite.config.js: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from "url"; 2 | 3 | import { defineConfig } from "vite"; 4 | import vue from "@vitejs/plugin-vue"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue()], 9 | resolve: { 10 | alias: { 11 | "@": fileURLToPath(new URL("./src", import.meta.url)), 12 | }, 13 | }, 14 | server: { 15 | host: true, 16 | port: 8080, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /maplibre-gl-js/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/assets/application-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-js-react-iot-asset-tracking/assets/application-image.png -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/assets/architecture-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-js-react-iot-asset-tracking/assets/architecture-diagram.png -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/assets/iot-core-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-js-react-iot-asset-tracking/assets/iot-core-screen.png -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/assets/stack-outputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-js-react-iot-asset-tracking/assets/stack-outputs.png -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "maplibre-js-react-iot-asset-tracking", 3 | "version": "2.0.0", 4 | "scripts": { 5 | "start": "vite", 6 | "build": "vite build", 7 | "preview": "vite preview" 8 | }, 9 | "dependencies": { 10 | "@aws-amplify/ui-react": "^5.0.4", 11 | "@aws-amplify/ui-react-geo": "^1.0.1", 12 | "@aws-sdk/client-location": "^3.370.0", 13 | "aws-amplify": "^5.3.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.14", 19 | "@types/react-dom": "^18.2.6", 20 | "@vitejs/plugin-react": "^4.0.1", 21 | "eslint": "^8.44.0", 22 | "eslint-plugin-react": "^7.32.2", 23 | "eslint-plugin-react-hooks": "^4.6.0", 24 | "eslint-plugin-react-refresh": "^0.4.1", 25 | "vite": "^4.4.0" 26 | }, 27 | "license": "MIT-0" 28 | } 29 | -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | import App from "./App"; 4 | import { Amplify } from "aws-amplify"; 5 | import config from "./aws-exports"; 6 | import "@aws-amplify/ui-react/styles.css"; 7 | import "@aws-amplify/ui-react-geo/styles.css"; 8 | import "./index.css"; 9 | 10 | Amplify.configure(config); 11 | 12 | createRoot(document.getElementById("root")).render( 13 | 14 | 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /maplibre-js-react-iot-asset-tracking/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /maplibre-native-android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | app/src/main/res/values/configuration.xml 3 | -------------------------------------------------------------------------------- /maplibre-native-android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/maplibre-native-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/values/configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | [identity pool id] 4 | [map name] 5 | [region] 6 | 7 | -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Amazon Location Service 3 | -------------------------------------------------------------------------------- /maplibre-native-android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /maplibre-native-android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | ext.kotlin_version = "1.5.10" 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.0.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | mavenCentral() 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } -------------------------------------------------------------------------------- /maplibre-native-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Nov 04 12:10:12 PST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip 7 | -------------------------------------------------------------------------------- /maplibre-native-android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Amazon Location Service Demo" -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "MapLibre GL Native", 6 | "repositoryURL": "https://github.com/maptiler/maplibre-gl-native-distribution", 7 | "state": { 8 | "branch": null, 9 | "revision": "dc28d9ad9e1b5c52cdeab26e2fe1781db4974e9a", 10 | "version": "5.11.0" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo/Amazon_Location_Service_DemoApp.swift: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import SwiftUI 5 | 6 | @main 7 | struct Amazon_Location_Service_DemoApp: App { 8 | var body: some Scene { 9 | WindowGroup { 10 | ContentView() 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /maplibre-native-ios/Amazon Location Service Demo/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /maplibre-native-ios/Podfile: -------------------------------------------------------------------------------- 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # SPDX-License-Identifier: MIT-0 3 | 4 | platform :ios, '12.0' 5 | 6 | target 'Amazon Location Service Demo' do 7 | use_frameworks! 8 | 9 | pod 'AWSCore' 10 | end 11 | -------------------------------------------------------------------------------- /maplibre-native-ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AWSCore (2.26.2) 3 | 4 | DEPENDENCIES: 5 | - AWSCore 6 | 7 | SPEC REPOS: 8 | trunk: 9 | - AWSCore 10 | 11 | SPEC CHECKSUMS: 12 | AWSCore: dd7f74ab3f354aad435f83afdbfac91bcb7d44c2 13 | 14 | PODFILE CHECKSUM: ce10d51c7e0402b58a1b252bcc7e330d73a9d529 15 | 16 | COCOAPODS: 1.11.2 17 | -------------------------------------------------------------------------------- /openlayers-amplify/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "openlayersstarter", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "none", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "dist", 10 | "BuildCommand": "npm run-script build", 11 | "StartCommand": "npm run-script start" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /openlayers-amplify/amplify/backend/geo/mapce7dbf38/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /openlayers-amplify/amplify/backend/geo/mapce7dbf38/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "mapce7dbf38", 9 | "mapStyle": "VectorHereExplore", 10 | "isDefault": true 11 | } -------------------------------------------------------------------------------- /openlayers-amplify/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /openlayers-amplify/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "openlayersstarter20b33ecd": { 4 | "AppClientID": "string", 5 | "AppClientIDWeb": "string", 6 | "CreatedSNSRole": "string", 7 | "IdentityPoolId": "string", 8 | "IdentityPoolName": "string", 9 | "UserPoolArn": "string", 10 | "UserPoolId": "string", 11 | "UserPoolName": "string" 12 | } 13 | }, 14 | "geo": { 15 | "mapce7dbf38": { 16 | "Arn": "string", 17 | "Name": "string", 18 | "Region": "string", 19 | "Style": "string" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /openlayers-amplify/img/README01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/openlayers-amplify/img/README01.gif -------------------------------------------------------------------------------- /openlayers-amplify/img/README02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/openlayers-amplify/img/README02.png -------------------------------------------------------------------------------- /openlayers-amplify/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | OpenLayers Amplify x Amazon Location Service 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /openlayers-amplify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openlayers-amplify", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "vite", 6 | "build": "tsc && vite build", 7 | "preview": "vite preview" 8 | }, 9 | "devDependencies": { 10 | "typescript": "^5.1.3", 11 | "vite": "^4.3.9" 12 | }, 13 | "dependencies": { 14 | "@geoblocks/ol-maplibre-layer": "^0.1.1", 15 | "aws-amplify": "^5.2.5", 16 | "maplibre-gl-js-amplify": "^3.1.0", 17 | "ol": "^7.4.0" 18 | }, 19 | "license": "MIT-0", 20 | "author": "Yasunori Kirimoto" 21 | } -------------------------------------------------------------------------------- /openlayers-amplify/src/@geoblocks:ol-maplibre-layer.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@geoblocks/ol-maplibre-layer'; -------------------------------------------------------------------------------- /openlayers-amplify/src/style.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | padding: 0; 5 | margin: 0; 6 | } 7 | 8 | #map { 9 | z-index: 0; 10 | height: 100%; 11 | } -------------------------------------------------------------------------------- /openlayers-amplify/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /openlayers-amplify/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "allowJs": true, 8 | "moduleResolution": "Node", 9 | "strict": true, 10 | "sourceMap": true, 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "esModuleInterop": true, 14 | "noEmit": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "noImplicitReturns": true, 18 | "skipLibCheck": true 19 | }, 20 | "include": ["src"] 21 | } 22 | -------------------------------------------------------------------------------- /openlayers-amplify/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | resolve: { 5 | alias: { 6 | './runtimeConfig': './runtimeConfig.browser', 7 | }, 8 | }, 9 | define: { 10 | 'window.global': {} 11 | }, 12 | build: { 13 | target: 'esnext' 14 | }, 15 | server: { 16 | host: true, 17 | port: 8080, 18 | }, 19 | }) -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "amazon-location-samples", 3 | "version": "1.0.0", 4 | "keywords": [ 5 | "amazon location", 6 | "map", 7 | "location", 8 | "als", 9 | "amazon location service", 10 | "maplibre" 11 | ], 12 | "author": { 13 | "name": "Amazon Web Services", 14 | "url": "https://aws.amazon.com" 15 | }, 16 | "license": "MIT", 17 | "workspaces": [ 18 | "react-map-gl-polygons", 19 | "react-map-gl-markers", 20 | "react-map-gl-map-styles", 21 | "react-map-gl-clusters", 22 | "react-map-gl-change-map-language", 23 | "react-map-gl-amplify-here-map", 24 | "openlayers-amplify", 25 | "create-custom-map-style", 26 | "amazon-location-helpers" 27 | ] 28 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true 5 | }, 6 | "extends": [ 7 | "eslint:recommended", 8 | "plugin:react/recommended" 9 | ], 10 | "parserOptions": { 11 | "ecmaFeatures": { 12 | "jsx": true 13 | }, 14 | "ecmaVersion": 12, 15 | "sourceType": "module" 16 | }, 17 | "plugins": [ 18 | "react" 19 | ], 20 | "rules": { 21 | "indent": [ 22 | "error", 23 | 2 24 | ], 25 | "linebreak-style": [ 26 | "error", 27 | "unix" 28 | ], 29 | "quotes": [ 30 | "error", 31 | "double" 32 | ], 33 | "semi": [ 34 | "error", 35 | "always" 36 | ], 37 | "react/prop-types": 0 38 | } 39 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/.config/project-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "awsheredemo", 3 | "version": "3.1", 4 | "frontend": "javascript", 5 | "javascript": { 6 | "framework": "react", 7 | "config": { 8 | "SourceDir": "src", 9 | "DistributionDir": "build", 10 | "BuildCommand": "npm run-script build", 11 | "StartCommand": "npm run-script start" 12 | } 13 | }, 14 | "providers": [ 15 | "awscloudformation" 16 | ] 17 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/customgeo/routecalculator/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "unauthRoleName": { 3 | "Ref": "UnauthRoleName" 4 | }, 5 | "authRoleName": { 6 | "Ref": "AuthRoleName" 7 | }, 8 | "geomap2bf94dcbName": { 9 | "Fn::GetAtt": [ 10 | "geomap2bf94dcb", 11 | "Outputs.Name" 12 | ] 13 | } 14 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/geo/map2bf94dcb/cli-inputs.json: -------------------------------------------------------------------------------- 1 | { 2 | "groupPermissions": [] 3 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/geo/map2bf94dcb/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "mapName": "map2bf94dcb", 9 | "mapStyle": "VectorHereExplore", 10 | "pricingPlan": "RequestBasedUsage", 11 | "isDefault": true 12 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/geo/placeindex0e5572f7/parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "authRoleName": { 3 | "Ref": "AuthRoleName" 4 | }, 5 | "unauthRoleName": { 6 | "Ref": "UnauthRoleName" 7 | }, 8 | "indexName": "placeindex0e5572f7", 9 | "dataProvider": "Here", 10 | "dataSourceIntendedUse": "SingleUse", 11 | "pricingPlan": "RequestBasedUsage", 12 | "isDefault": true 13 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/hosting/amplifyhosting/amplifyhosting-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "{\"createdOn\":\"Linux\",\"createdBy\":\"Amplify\",\"createdWith\":\"11.0.3\",\"stackType\":\"hosting-amplifyhosting\",\"metadata\":{}}", 4 | "Parameters": { 5 | "env": { 6 | "Type": "String" 7 | }, 8 | "appId": { 9 | "Type": "String" 10 | }, 11 | "type": { 12 | "Type": "String" 13 | } 14 | }, 15 | "Conditions": { 16 | "isManual": { 17 | "Fn::Equals": [ 18 | { 19 | "Ref": "type" 20 | }, 21 | "manual" 22 | ] 23 | } 24 | }, 25 | "Resources": { 26 | "AmplifyBranch": { 27 | "Condition": "isManual", 28 | "Type": "AWS::Amplify::Branch", 29 | "Properties": { 30 | "BranchName": { 31 | "Ref": "env" 32 | }, 33 | "AppId": { 34 | "Ref": "appId" 35 | } 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/tags.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Key": "user:Stack", 4 | "Value": "{project-env}" 5 | }, 6 | { 7 | "Key": "user:Application", 8 | "Value": "{project-name}" 9 | } 10 | ] -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/amplify/backend/types/amplify-dependent-resources-ref.d.ts: -------------------------------------------------------------------------------- 1 | export type AmplifyDependentResourcesAttributes = { 2 | "auth": { 3 | "awsheredemo4fc859b5": { 4 | "AppClientID": "string", 5 | "AppClientIDWeb": "string", 6 | "IdentityPoolId": "string", 7 | "IdentityPoolName": "string", 8 | "UserPoolArn": "string", 9 | "UserPoolId": "string", 10 | "UserPoolName": "string" 11 | } 12 | }, 13 | "geo": { 14 | "map2bf94dcb": { 15 | "Arn": "string", 16 | "Name": "string", 17 | "Region": "string", 18 | "Style": "string" 19 | }, 20 | "placeindex0e5572f7": { 21 | "Arn": "string", 22 | "Name": "string", 23 | "Region": "string" 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-map-gl-amplify-here-map", 3 | "version": "0.5.0", 4 | "description": "Demo created for demonstrations purposes for [re:Invent 2021](https://reinvent.awsevents.com/).", 5 | "dependencies": { 6 | "@aws-amplify/ui-react": "^5.0.0", 7 | "aws-amplify": "^5.2.5", 8 | "maplibre-gl-js-amplify": "^3.1.0", 9 | "@react-aria/button": "^3.7.2", 10 | "@react-aria/numberfield": "^3.5.1", 11 | "@react-aria/slider": "^3.4.1", 12 | "@react-aria/switch": "^3.5.1", 13 | "normalize.css": "^8.0.1", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0" 16 | }, 17 | "scripts": { 18 | "start": "vite", 19 | "build": "vite build", 20 | "preview": "vite preview" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "devDependencies": { 29 | "@types/react": "^18.2.9", 30 | "@types/react-dom": "^18.2.4", 31 | "@vitejs/plugin-react": "^4.0.0", 32 | "vite": "^4.3.9" 33 | }, 34 | "license": "MIT-0" 35 | } -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-amplify-here-map/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/components/overlays/CustomControl.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export default class CustomControl { 5 | constructor(redraw, id) { 6 | this._redraw = redraw; 7 | this._id = id; 8 | } 9 | 10 | onAdd(map) { 11 | this._map = map; 12 | map.on("move", this._redraw); 13 | this._container = document.createElement("div"); 14 | this._container.className = "maplibre-ctrl"; 15 | this._container.id = this._id; 16 | this._redraw(); 17 | return this._container; 18 | } 19 | 20 | onRemove() { 21 | this._container.remove(); 22 | this._map.off("move", this._redraw); 23 | this._map = null; 24 | } 25 | 26 | getMap() { 27 | return this._map; 28 | } 29 | 30 | getElement() { 31 | return this._container; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/components/overlays/Pin.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from "react"; 5 | import { Marker } from "react-map-gl"; 6 | 7 | // Component: Pin - A basic map marker pin 8 | function Pin(props) { 9 | const { geometry } = props; 10 | 11 | if (geometry == null || geometry === undefined) { 12 | return null; 13 | } 14 | 15 | return ( 16 |
17 | 25 |
26 | ); 27 | } 28 | 29 | export default Pin; 30 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/components/primitives/Button.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useRef } from "react"; 5 | import { useButton } from "@react-aria/button"; 6 | 7 | const Button = (props) => { 8 | let ref = useRef(); 9 | const { className, title, style } = props; 10 | let { buttonProps } = useButton(props, ref); 11 | let { children } = props; 12 | 13 | return ( 14 | 23 | ); 24 | }; 25 | 26 | export default Button; 27 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/components/primitives/NavigateIcon.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { memo } from "react"; 5 | 6 | const ICON = 7 | "M24 9.844l-3.583 6.781-1.084-2.625c-4.05 2.278-5.11 5.961-5.333 10h-4c.189-5.147 1.358-10.246 7.75-13.875l-1.041-2.625 7.291 2.344zm-13.242 3.975c-1.098-1.341-2.558-2.586-4.508-3.694l1.041-2.625-7.291 2.344 3.583 6.781 1.084-2.625c2.018 1.135 3.293 2.62 4.093 4.323.412-1.533 1.046-3.052 1.998-4.504zm1.242-13.819l-5 5h3v5.267c.764.621 1.428 1.268 2.011 1.936.582-.666 1.227-1.316 1.989-1.936v-5.267h3l-5-5z"; 8 | 9 | const NavigationIcon = memo(function NavigationIcon({ width, height, style }) { 10 | return ( 11 | 17 | 18 | 19 | ); 20 | }); 21 | 22 | export default NavigationIcon; 23 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/components/routing/Options.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React, { useState } from "react"; 5 | import { View } from "@aws-amplify/ui-react"; 6 | import DepartureTimeSelector from "./DepartureTimeSelector"; 7 | import ModeOptions from "./ModeOptions"; 8 | 9 | // Component: Options - Renders the options for the user to select 10 | const Options = () => { 11 | const [isOptionOpen, setIsOptionOpen] = useState(false); 12 | 13 | return ( 14 | 15 | {isOptionOpen ? ( 16 | 20 | ) : ( 21 | 25 | )} 26 | 27 | ); 28 | }; 29 | 30 | export default Options; 31 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/hooks/useDebounce.js: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { useEffect, useState } from "react"; 5 | 6 | // Custom hook to debounce a state value 7 | function useDebounce(value, delay) { 8 | // State and setters for debounced value 9 | const [debouncedValue, setDebouncedValue] = useState(value); 10 | useEffect( 11 | () => { 12 | // Update debounced value after delay 13 | const handler = setTimeout(() => { 14 | setDebouncedValue(value); 15 | }, delay); 16 | // Cancel the timeout if value changes (also on delay change or unmount) 17 | // This is how we prevent debounced value from updating if value is changed ... 18 | // .. within the delay period. Timeout gets cleared and restarted. 19 | return () => { 20 | clearTimeout(handler); 21 | }; 22 | }, 23 | [value, delay] // Only re-call effect if value or delay changes 24 | ); 25 | return debouncedValue; 26 | } 27 | 28 | export default useDebounce; 29 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/index.css: -------------------------------------------------------------------------------- 1 | /* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 */ 3 | 4 | .routing-mode-selector .amplify-flex.amplify-radiogroup { 5 | width: 100%; 6 | gap: 0; 7 | } 8 | 9 | .custom-radio .amplify-radio__input + .amplify-radio__button { 10 | display: none; 11 | } 12 | 13 | .routing-mode-selector .amplify-flex.amplify-radiogroup > div > label { 14 | align-items: center; 15 | justify-content: center; 16 | } 17 | 18 | .routing-mode-selector 19 | .amplify-flex.amplify-radiogroup 20 | > div 21 | > label 22 | .amplify-radio__label { 23 | color: white; 24 | } 25 | 26 | .amplify-sliderfield > .amplify-sliderfield__label > span { 27 | font-size: var(--amplify-font-sizes-small); 28 | color: var(--amplify-colors-font-primary); 29 | } 30 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/src/main.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import React from "react"; 5 | import { createRoot } from "react-dom/client"; 6 | import App from "./App"; 7 | import { AmplifyProvider } from "@aws-amplify/ui-react"; 8 | import "normalize.css"; 9 | import "@aws-amplify/ui-react/styles.css"; 10 | import "./index.css"; 11 | import { Amplify } from "aws-amplify"; 12 | import awsconfig from "./aws-exports"; 13 | 14 | Amplify.configure(awsconfig); 15 | 16 | const theme = { 17 | name: "my-theme", 18 | tokens: { 19 | colors: { 20 | brand: { 21 | primary: { value: "#FF9900" }, 22 | }, 23 | background: { 24 | secondary: { value: "rgba(107, 114, 128, 1)" }, 25 | }, 26 | }, 27 | }, 28 | }; 29 | 30 | createRoot(document.getElementById("root")).render( 31 | 32 | 33 | 34 | 35 | 36 | ); 37 | -------------------------------------------------------------------------------- /react-map-gl-amplify-here-map/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /react-map-gl-change-map-language/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | software and associated documentation files (the "Software"), to deal in the Software 5 | without restriction, including without limitation the rights to use, copy, modify, 6 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 7 | permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 10 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 11 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 12 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 13 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 14 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | 17 | ------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /react-map-gl-change-map-language/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-change-map-language/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-map-gl-change-map-language", 3 | "version": "2.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "aws-amplify": "^5.2.5", 12 | "maplibre-gl-js-amplify": "^3.1.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-map-gl": "^7.0.25" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.9", 19 | "@types/react-dom": "^18.2.4", 20 | "@vitejs/plugin-react": "^4.0.0", 21 | "vite": "^4.3.9" 22 | }, 23 | "license": "MIT-0" 24 | } -------------------------------------------------------------------------------- /react-map-gl-change-map-language/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-change-map-language/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-change-map-language/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-change-map-language/src/components/CustomControl.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | export default class CustomControl { 5 | constructor(redraw, id) { 6 | this._redraw = redraw; 7 | this._id = id; 8 | } 9 | 10 | onAdd(map) { 11 | this._map = map; 12 | map.on("move", this._redraw); 13 | this._container = document.createElement("div"); 14 | this._container.className = "maplibre-ctrl"; 15 | this._container.id = this._id; 16 | this._redraw(); 17 | return this._container; 18 | } 19 | 20 | onRemove() { 21 | this._container.remove(); 22 | this._map.off("move", this._redraw); 23 | this._map = null; 24 | } 25 | 26 | getMap() { 27 | return this._map; 28 | } 29 | 30 | getElement() { 31 | return this._container; 32 | } 33 | } -------------------------------------------------------------------------------- /react-map-gl-change-map-language/src/configuration.js: -------------------------------------------------------------------------------- 1 | // This configuration file is a single place to provide any values to set up the app 2 | 3 | export const IDENTITY_POOL_ID = 4 | "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab"; // REQUIRED - Amazon Cognito Identity Pool ID 5 | 6 | export const REGION = "XX-XXXX-X"; // REQUIRED - Amazon Cognito Region 7 | 8 | export const MAP = { 9 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 10 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 11 | }; 12 | -------------------------------------------------------------------------------- /react-map-gl-change-map-language/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react-map-gl-change-map-language/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /react-map-gl-clusters/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /react-map-gl-clusters/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-clusters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-map-gl-clusters", 3 | "version": "2.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "aws-amplify": "^5.2.5", 12 | "maplibre-gl-js-amplify": "^3.1.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-map-gl": "^7.0.25" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.9", 19 | "@types/react-dom": "^18.2.4", 20 | "@vitejs/plugin-react": "^4.0.0", 21 | "vite": "^4.3.9" 22 | }, 23 | "license": "MIT-0" 24 | } -------------------------------------------------------------------------------- /react-map-gl-clusters/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-clusters/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-clusters/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-clusters/src/components/LocationPopup.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Popup } from "react-map-gl"; 5 | 6 | // Display a popup that appears when points are clicked 7 | const LocationPopup = ({ popupData, onPopupClose }) => { 8 | return ( 9 | 18 |
19 |
20 | {popupData.title} 21 |
22 |
{popupData.description}
23 |
24 |
25 | ); 26 | }; 27 | 28 | export default LocationPopup; 29 | -------------------------------------------------------------------------------- /react-map-gl-clusters/src/configuration.js: -------------------------------------------------------------------------------- 1 | // This configuration file is a single place to provide any values to set up the app 2 | 3 | export const IDENTITY_POOL_ID = 4 | "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab"; // REQUIRED - Amazon Cognito Identity Pool ID 5 | 6 | export const REGION = "XX-XXXX-X"; // REQUIRED - Amazon Cognito Region 7 | 8 | export const MAP = { 9 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 10 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 11 | }; 12 | -------------------------------------------------------------------------------- /react-map-gl-clusters/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | body { 7 | margin: 0; 8 | font-family: sans-serif; 9 | } -------------------------------------------------------------------------------- /react-map-gl-clusters/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /react-map-gl-map-styles/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /react-map-gl-map-styles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-map-styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-map-gl-map-styles", 3 | "version": "2.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "aws-amplify": "^5.2.5", 12 | "maplibre-gl-js-amplify": "^3.1.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-map-gl": "^7.0.25" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.9", 19 | "@types/react-dom": "^18.2.4", 20 | "@vitejs/plugin-react": "^4.0.0", 21 | "vite": "^4.3.9" 22 | }, 23 | "license": "MIT-0" 24 | } -------------------------------------------------------------------------------- /react-map-gl-map-styles/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-map-styles/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-map-styles/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-map-styles/src/components/MapControl.module.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | .position { 7 | position: absolute; 8 | left: 20px; 9 | bottom: 20px; 10 | z-index: 10; 11 | } 12 | 13 | .container { 14 | display: flex; 15 | flex-direction: column; 16 | box-shadow: 0 0 0 2px rgb(0 0 0 / 10%); 17 | border-radius: 4px; 18 | background: white; 19 | padding: 0.5rem 1rem; 20 | color: #333333; 21 | } 22 | 23 | .heading { 24 | margin: 0.5rem 0; 25 | } 26 | 27 | label { 28 | margin-bottom: 0.5rem; 29 | } 30 | 31 | input { 32 | margin-right: 0.5rem; 33 | } -------------------------------------------------------------------------------- /react-map-gl-map-styles/src/configuration.js: -------------------------------------------------------------------------------- 1 | // This configuration file is a single place to provide any values to set up the app 2 | 3 | export const IDENTITY_POOL_ID = 4 | "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab"; // REQUIRED - Amazon Cognito Identity Pool ID 5 | 6 | export const REGION = "XX-XXXX-X"; // REQUIRED - Amazon Cognito Region 7 | 8 | // These are the different Amazon Location Service map styles that users can switch to display 9 | export const MAPS = [ 10 | { 11 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 12 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 13 | LABEL: "XXXXXXXXXXX", // REQUIRED - Text to be displayed for the map in the layer control box 14 | }, 15 | { 16 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 17 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 18 | LABEL: "XXXXXXXXXXX", // REQUIRED - Text to be displayed for the map in the layer control box 19 | }, 20 | ]; 21 | -------------------------------------------------------------------------------- /react-map-gl-map-styles/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | body { 7 | margin: 0; 8 | font-family: sans-serif; 9 | } -------------------------------------------------------------------------------- /react-map-gl-map-styles/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /react-map-gl-markers/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /react-map-gl-markers/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-markers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-map-gl-markers", 3 | "version": "2.0.0", 4 | "type": "module", 5 | "scripts": { 6 | "start": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "dependencies": { 11 | "aws-amplify": "^5.2.5", 12 | "maplibre-gl-js-amplify": "^3.1.0", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-map-gl": "^7.0.25" 16 | }, 17 | "devDependencies": { 18 | "@types/react": "^18.2.9", 19 | "@types/react-dom": "^18.2.4", 20 | "@vitejs/plugin-react": "^4.0.0", 21 | "vite": "^4.3.9" 22 | }, 23 | "license": "MIT-0" 24 | } -------------------------------------------------------------------------------- /react-map-gl-markers/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-markers/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-markers/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-markers/src/components/LocationPopup.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Popup } from "react-map-gl"; 5 | 6 | // Display a popup that appears when markers are clicked 7 | const LocationPopup = ({ popupData, onPopupClose }) => { 8 | return ( 9 | 18 |
19 |
20 | {popupData.title} 21 |
22 |
{popupData.description}
23 |
24 |
25 | ); 26 | }; 27 | 28 | export default LocationPopup; 29 | -------------------------------------------------------------------------------- /react-map-gl-markers/src/components/MarkersFeature.module.css: -------------------------------------------------------------------------------- 1 | /* Change cursor to a point when hovered over a marker */ 2 | .marker svg:hover { 3 | cursor: pointer; 4 | } -------------------------------------------------------------------------------- /react-map-gl-markers/src/configuration.js: -------------------------------------------------------------------------------- 1 | // This configuration file is a single place to provide any values to set up the app 2 | 3 | export const IDENTITY_POOL_ID = 4 | "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab"; // REQUIRED - Amazon Cognito Identity Pool ID 5 | 6 | export const REGION = "XX-XXXX-X"; // REQUIRED - Amazon Cognito Region 7 | 8 | export const MAP = { 9 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 10 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 11 | }; 12 | -------------------------------------------------------------------------------- /react-map-gl-markers/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | body { 7 | margin: 0; 8 | font-family: sans-serif; 9 | } -------------------------------------------------------------------------------- /react-map-gl-markers/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /react-map-gl-polygons/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 11 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 12 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | 16 | -------------------------------------------------------------------------------- /react-map-gl-polygons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Amazon Location Service | Example 13 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /react-map-gl-polygons/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !favicon.ico 3 | !.gitignore -------------------------------------------------------------------------------- /react-map-gl-polygons/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/react-map-gl-polygons/public/favicon.ico -------------------------------------------------------------------------------- /react-map-gl-polygons/src/components/PolygonsFeature.jsx: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import { Source, Layer } from "react-map-gl"; 5 | import geojsonData from "../data/VancouverBoundary.json"; // Boundary of Vancouver 6 | 7 | // Properties for the polygons layer 8 | const polygonsLayer = { 9 | id: "polygons", 10 | type: "fill", 11 | source: "polygons-source", 12 | paint: { 13 | "fill-color": "#9f34ff", 14 | "fill-opacity": 0.3, 15 | }, 16 | }; 17 | 18 | // Display polygons from GeoJSON data. 19 | const PolygonsFeature = () => { 20 | return ( 21 | // Create a source that specifies which data it should display 22 | 23 | {/* Create a map layer to display the polygons */} 24 | 25 | 26 | ); 27 | }; 28 | 29 | export default PolygonsFeature; 30 | -------------------------------------------------------------------------------- /react-map-gl-polygons/src/configuration.js: -------------------------------------------------------------------------------- 1 | // This configuration file is a single place to provide any values to set up the app 2 | 3 | export const IDENTITY_POOL_ID = 4 | "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab"; // REQUIRED - Amazon Cognito Identity Pool ID 5 | 6 | export const REGION = "XX-XXXX-X"; // REQUIRED - Amazon Cognito Region 7 | 8 | export const MAP = { 9 | NAME: "XXXXXXXXXXX", // REQUIRED - Amazon Location Service Map resource name 10 | STYLE: "XXXXXXXXXXX", // REQUIRED - String representing the style of map resource 11 | }; 12 | -------------------------------------------------------------------------------- /react-map-gl-polygons/src/index.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | SPDX-License-Identifier: MIT-0 4 | */ 5 | 6 | body { 7 | margin: 0; 8 | font-family: sans-serif; 9 | } -------------------------------------------------------------------------------- /react-map-gl-polygons/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | /** @type {import('vite').UserConfig} */ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | resolve: { alias: { "./runtimeConfig": "./runtimeConfig.browser" } }, 8 | server: { 9 | host: true, 10 | port: 8080, 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /route-udf-lambda-redshift/UDF/CreateFunction.sql: -------------------------------------------------------------------------------- 1 | -- Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -- SPDX-License-Identifier: MIT-0 3 | 4 | CREATE OR REPLACE EXTERNAL FUNCTION public.f_calculate_route(DOUBLE PRECISION, DOUBLE PRECISION, DOUBLE PRECISION, DOUBLE PRECISION) 5 | RETURNS VARCHAR 6 | STABLE 7 | LAMBDA '' 8 | IAM_ROLE ''; -------------------------------------------------------------------------------- /route-udf-lambda-redshift/UDF/CreateTable.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE departures_destinations 2 | ( 3 | departure_id INTEGER NOT NULL, 4 | destination_id INTEGER NOT NULL, 5 | departure_longitude DOUBLE PRECISION NOT NULL, 6 | departure_latitude DOUBLE PRECISION NOT NULL, 7 | destination_longitude DOUBLE PRECISION NOT NULL, 8 | destination_latitude DOUBLE PRECISION NOT NULL, 9 | PRIMARY KEY (departure_id, destination_id) 10 | ) -------------------------------------------------------------------------------- /tangram-es-android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /tangram-es-android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tangram-es-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/values/configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | [identity pool id] 4 | [map name] 5 | [region] 6 | https://www.nextzen.org/carto/cinnabar-style/9/cinnabar-style.zip 7 | © 2021 HERE 8 | 9 | -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Amazon Location Service Demo 3 | -------------------------------------------------------------------------------- /tangram-es-android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /tangram-es-android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | ext.kotlin_version = "1.4.10" 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.3' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } -------------------------------------------------------------------------------- /tangram-es-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 12 14:24:18 PST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 7 | -------------------------------------------------------------------------------- /tangram-es-android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Amazon Location Service Demo" -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo/Amazon_Location_Service_DemoApp.swift: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import SwiftUI 5 | 6 | @main 7 | struct Amazon_Location_Service_DemoApp: App { 8 | var body: some Scene { 9 | WindowGroup { 10 | ContentView() 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tangram-es-ios/Amazon Location Service Demo/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tangram-es-ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '12.0' 2 | 3 | target 'Amazon Location Service Demo' do 4 | use_frameworks! 5 | 6 | pod 'AWSCore' 7 | pod 'Tangram-es' 8 | end 9 | -------------------------------------------------------------------------------- /tangram-es-ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AWSCore (2.24.0) 3 | - Tangram-es (0.16.1) 4 | 5 | DEPENDENCIES: 6 | - AWSCore 7 | - Tangram-es 8 | 9 | SPEC REPOS: 10 | trunk: 11 | - AWSCore 12 | - Tangram-es 13 | 14 | SPEC CHECKSUMS: 15 | AWSCore: d5cd1311b33a4ae9faacda839c0ac9fff711cd79 16 | Tangram-es: daf4c177f864505df5125f83c2d8ba857165aea1 17 | 18 | PODFILE CHECKSUM: cb64538e353d8215ccafc4ef0eaa2cd61f8bca05 19 | 20 | COCOAPODS: 1.10.1 21 | -------------------------------------------------------------------------------- /tracking-android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | /.idea/ 17 | -------------------------------------------------------------------------------- /tracking-android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /tracking-android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /tracking-android/app/src/androidTest/java/aws/location/demo/trackingsample/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package aws.location.demo.trackingsample 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("aws.location.demo.trackingsample", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/amazon-location-samples/ce30b008a959d7f9a372312fd62e83a95af8b316/tracking-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Tracking Sample 3 | Permission to use location data required 4 | Your tracker name here 5 | -------------------------------------------------------------------------------- /tracking-android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /tracking-android/app/src/test/java/aws/location/demo/trackingsample/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package aws.location.demo.trackingsample 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /tracking-android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | ext.kotlin_version = "1.4.10" 4 | repositories { 5 | google() 6 | jcenter() 7 | } 8 | dependencies { 9 | classpath "com.android.tools.build:gradle:4.1.1" 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | } 23 | 24 | task clean(type: Delete) { 25 | delete rootProject.buildDir 26 | } -------------------------------------------------------------------------------- /tracking-android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Nov 16 18:57:50 EST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip 7 | -------------------------------------------------------------------------------- /tracking-android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Tracking Sample" -------------------------------------------------------------------------------- /tracking-ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'TrackingSample' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for TrackingSample 9 | pod 'AWSMobileClient' 10 | pod 'AWSCore' 11 | pod 'AWSLocation' 12 | 13 | target 'TrackingSampleTests' do 14 | inherit! :search_paths 15 | # Pods for testing 16 | end 17 | 18 | target 'TrackingSampleUITests' do 19 | # Pods for testing 20 | end 21 | 22 | end 23 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample/ContentView.swift: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import SwiftUI 5 | 6 | struct ContentView: View { 7 | let locationManagement = LocationManagement() 8 | var body: some View { 9 | Text("Hello, world!") 10 | .padding() 11 | } 12 | } 13 | 14 | struct ContentView_Previews: PreviewProvider { 15 | static var previews: some View { 16 | ContentView() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSample/TrackingSampleApp.swift: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import SwiftUI 5 | import AWSMobileClient 6 | 7 | class AppDelegate: NSObject, UIApplicationDelegate { 8 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 9 | AWSMobileClient.default().initialize { (userState, error) in 10 | if let userState = userState { 11 | print("UserState: \(userState.rawValue)") 12 | } else if let error = error { 13 | print("error: \(error.localizedDescription)") 14 | } 15 | } 16 | return true 17 | } 18 | } 19 | 20 | @main 21 | struct TrackingSampleApp: App { 22 | @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate 23 | 24 | var body: some Scene { 25 | WindowGroup { 26 | ContentView() 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSampleTests/TrackingSampleTests.swift: -------------------------------------------------------------------------------- 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | // SPDX-License-Identifier: MIT-0 3 | 4 | import XCTest 5 | @testable import TrackingSample 6 | 7 | class TrackingSampleTests: XCTestCase { 8 | 9 | override func setUpWithError() throws { 10 | // Put setup code here. This method is called before the invocation of each test method in the class. 11 | } 12 | 13 | override func tearDownWithError() throws { 14 | // Put teardown code here. This method is called after the invocation of each test method in the class. 15 | } 16 | 17 | func testExample() throws { 18 | // This is an example of a functional test case. 19 | // Use XCTAssert and related functions to verify your tests produce the correct results. 20 | } 21 | 22 | func testPerformanceExample() throws { 23 | // This is an example of a performance test case. 24 | self.measure { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /tracking-ios/TrackingSampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | --------------------------------------------------------------------------------