|
| 1 | +--- |
| 2 | +title: "Google Maps" |
| 3 | +description: "Google Maps is a widely used mapping service by Google, offering free and feature-rich navigation, location discovery, and real-time traffic updates accessible through web browsers and mobile apps." |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | +Categories: Helpers |
| 8 | + |
| 9 | + |
| 10 | +Type: googleMaps/v1 |
| 11 | + |
| 12 | +<hr /> |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +## Connections |
| 17 | + |
| 18 | +Version: 1 |
| 19 | + |
| 20 | + |
| 21 | +### api_key |
| 22 | + |
| 23 | +#### Properties |
| 24 | + |
| 25 | +| Name | Label | Type | Description | Required | |
| 26 | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| |
| 27 | +| api_token | API Key | STRING | API key that can be found at Google Cloud Console. | true | |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | +<hr /> |
| 34 | + |
| 35 | + |
| 36 | +## Actions |
| 37 | + |
| 38 | + |
| 39 | +### Get Route |
| 40 | +Name: getRoute |
| 41 | + |
| 42 | +`Get route between inputted origin and destination.` |
| 43 | + |
| 44 | +#### Properties |
| 45 | + |
| 46 | +| Name | Label | Type | Description | Required | |
| 47 | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| |
| 48 | +| origin | Origin | STRING | Specify address of origin in accordance with the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided. Street address elements should be delimited by spaces. | true | |
| 49 | +| destination | Destination | STRING | Specify address of destination in accordance with the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided. Street address elements should be delimited by spaces. | true | |
| 50 | +| travelMode | Travel Mode | STRING <details> <summary> Options </summary> DRIVE, BICYCLE, WALK, TRANSIT </details> | Desired travel mode. | false | |
| 51 | +| routingPreference | Routing Preference | STRING <details> <summary> Options </summary> TRAFFIC_UNAWARE, TRAFFIC_AWARE, TRAFFIC_AWARE_OPTIMAL </details> | Routing preference of the route. | false | |
| 52 | +| computeAlternativeRoutes | Compute Alternative Routes | BOOLEAN <details> <summary> Options </summary> true, false </details> | Whether alternative routes should be computed. | false | |
| 53 | +| avoidTolls | Avoid Tolls | BOOLEAN <details> <summary> Options </summary> true, false </details> | Whether to avoid tolls. | false | |
| 54 | +| avoidHighways | Avoid Highways | BOOLEAN <details> <summary> Options </summary> true, false </details> | Whether to avoid highways. | false | |
| 55 | +| avoidFerries | Avoid Ferries | BOOLEAN <details> <summary> Options </summary> true, false </details> | Whether to avoid ferries. | false | |
| 56 | +| units | Units | STRING <details> <summary> Options </summary> METRIC, IMPERIAL </details> | Metrics of the route | false | |
| 57 | + |
| 58 | +#### Example JSON Structure |
| 59 | +```json |
| 60 | +{ |
| 61 | + "label" : "Get Route", |
| 62 | + "name" : "getRoute", |
| 63 | + "parameters" : { |
| 64 | + "origin" : "", |
| 65 | + "destination" : "", |
| 66 | + "travelMode" : "", |
| 67 | + "routingPreference" : "", |
| 68 | + "computeAlternativeRoutes" : false, |
| 69 | + "avoidTolls" : false, |
| 70 | + "avoidHighways" : false, |
| 71 | + "avoidFerries" : false, |
| 72 | + "units" : "" |
| 73 | + }, |
| 74 | + "type" : "googleMaps/v1/getRoute" |
| 75 | +} |
| 76 | +``` |
| 77 | + |
| 78 | +#### Output |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +Type: OBJECT |
| 83 | + |
| 84 | + |
| 85 | +#### Properties |
| 86 | + |
| 87 | +| Name | Type | Description | |
| 88 | +|:------------:|:------------:|:-------------------:| |
| 89 | +| routes | ARRAY <details> <summary> Items </summary> [{[{INTEGER\(distanceMeters), STRING\(duration), STRING\(staticDuration), {STRING\(encodedPolyline)}\(polyline), {{NUMBER\(latitude), NUMBER\(longitude)}\(latLng)}\(startLocation), {{NUMBER\(latitude), NUMBER\(longitude)}\(latLng)}\(endLocation), []\(steps), {{STRING\(text)}\(distance), {STRING\(text)}\(duration), {STRING\(text)}\(staticDuration)}\(localizedValues)}]\(legs), INTEGER\(distanceMeters), STRING\(duration), STRING\(staticDuration), {{}\(encodedPolyline)}\(polyline), STRING\(description), {{NUMBER\(latitude), NUMBER\(longitude)}\(low), {NUMBER\(latitude), NUMBER\(longitude)}\(high)}\(viewport), {}\(travelAdvisory), {{STRING\(text)}\(distance), {STRING\(text)}\(duration), {STRING\(text)}\(staticDuration)}\(localizedValues), [STRING]\(routeLabels), {}\(polylineDetails)}] </details> | Routes from origin to destination. | |
| 90 | +| geocodingResults | OBJECT <details> <summary> Properties </summary> {} </details> | | |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +#### Output Example |
| 96 | +```json |
| 97 | +{ |
| 98 | + "routes" : [ { |
| 99 | + "legs" : [ { |
| 100 | + "distanceMeters" : 1, |
| 101 | + "duration" : "", |
| 102 | + "staticDuration" : "", |
| 103 | + "polyline" : { |
| 104 | + "encodedPolyline" : "" |
| 105 | + }, |
| 106 | + "startLocation" : { |
| 107 | + "latLng" : { |
| 108 | + "latitude" : 0.0, |
| 109 | + "longitude" : 0.0 |
| 110 | + } |
| 111 | + }, |
| 112 | + "endLocation" : { |
| 113 | + "latLng" : { |
| 114 | + "latitude" : 0.0, |
| 115 | + "longitude" : 0.0 |
| 116 | + } |
| 117 | + }, |
| 118 | + "steps" : [ ], |
| 119 | + "localizedValues" : { |
| 120 | + "distance" : { |
| 121 | + "text" : "" |
| 122 | + }, |
| 123 | + "duration" : { |
| 124 | + "text" : "" |
| 125 | + }, |
| 126 | + "staticDuration" : { |
| 127 | + "text" : "" |
| 128 | + } |
| 129 | + } |
| 130 | + } ], |
| 131 | + "distanceMeters" : 1, |
| 132 | + "duration" : "", |
| 133 | + "staticDuration" : "", |
| 134 | + "polyline" : { |
| 135 | + "encodedPolyline" : { } |
| 136 | + }, |
| 137 | + "description" : "", |
| 138 | + "viewport" : { |
| 139 | + "low" : { |
| 140 | + "latitude" : 0.0, |
| 141 | + "longitude" : 0.0 |
| 142 | + }, |
| 143 | + "high" : { |
| 144 | + "latitude" : 0.0, |
| 145 | + "longitude" : 0.0 |
| 146 | + } |
| 147 | + }, |
| 148 | + "travelAdvisory" : { }, |
| 149 | + "localizedValues" : { |
| 150 | + "distance" : { |
| 151 | + "text" : "" |
| 152 | + }, |
| 153 | + "duration" : { |
| 154 | + "text" : "" |
| 155 | + }, |
| 156 | + "staticDuration" : { |
| 157 | + "text" : "" |
| 158 | + } |
| 159 | + }, |
| 160 | + "routeLabels" : [ "" ], |
| 161 | + "polylineDetails" : { } |
| 162 | + } ], |
| 163 | + "geocodingResults" : { } |
| 164 | +} |
| 165 | +``` |
| 166 | + |
| 167 | + |
| 168 | +### Nearby Search |
| 169 | +Name: nearbySearch |
| 170 | + |
| 171 | +`Action takes one or more place types, and returns a list of matching places within the specified area.` |
| 172 | + |
| 173 | +#### Properties |
| 174 | + |
| 175 | +| Name | Label | Type | Description | Required | |
| 176 | +|:---------------:|:--------------:|:------------:|:-------------------:|:--------:| |
| 177 | +| includedTypes | Included | ARRAY <details> <summary> Items </summary> [STRING\($keyword)] </details> | Keywords which will be used for filtering. | true | |
| 178 | +| address | Address | STRING | Center address of the nearby search. | true | |
| 179 | +| radius | Radius | NUMBER | Radius of circle area that will be searched. The radius must be between 0.0 meters and 50000.0 meters inclusive. | true | |
| 180 | + |
| 181 | +#### Example JSON Structure |
| 182 | +```json |
| 183 | +{ |
| 184 | + "label" : "Nearby Search", |
| 185 | + "name" : "nearbySearch", |
| 186 | + "parameters" : { |
| 187 | + "includedTypes" : [ "" ], |
| 188 | + "address" : "", |
| 189 | + "radius" : 0.0 |
| 190 | + }, |
| 191 | + "type" : "googleMaps/v1/nearbySearch" |
| 192 | +} |
| 193 | +``` |
| 194 | + |
| 195 | +#### Output |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | +Type: ARRAY |
| 200 | + |
| 201 | + |
| 202 | +Items Type: OBJECT |
| 203 | + |
| 204 | + |
| 205 | +#### Properties |
| 206 | +| Name | Type | Description | |
| 207 | +|:------------:|:------------:|:-------------------:| |
| 208 | +| location | OBJECT <details> <summary> Properties </summary> {NUMBER\(latitude), NUMBER\(longitude)} </details> | Location of the place. | |
| 209 | +| businessStatus | STRING | Business status of the place. | |
| 210 | +| displayName | OBJECT <details> <summary> Properties </summary> {STRING\(text), STRING\(languageCode)} </details> | Display name of the place. | |
| 211 | +| accessibilityOptions | OBJECT <details> <summary> Properties </summary> {BOOLEAN\(wheelchairAccessibleParking), BOOLEAN\(wheelchairAccessibleEntrance), BOOLEAN\(wheelchairAccessibleRestroom), BOOLEAN\(wheelchairAccessibleSeating)} </details> | Accessibility options of the place. | |
| 212 | +| googleMapsLinks | OBJECT <details> <summary> Properties </summary> {STRING\(directionsUri), STRING\(placeUri), STRING\(writeAReviewUri), STRING\(reviewsUri), STRING\(photosUri)} </details> | Google Maps links connected to the place. | |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | +#### Output Example |
| 219 | +```json |
| 220 | +[ { |
| 221 | + "location" : { |
| 222 | + "latitude" : 0.0, |
| 223 | + "longitude" : 0.0 |
| 224 | + }, |
| 225 | + "businessStatus" : "", |
| 226 | + "displayName" : { |
| 227 | + "text" : "", |
| 228 | + "languageCode" : "" |
| 229 | + }, |
| 230 | + "accessibilityOptions" : { |
| 231 | + "wheelchairAccessibleParking" : false, |
| 232 | + "wheelchairAccessibleEntrance" : false, |
| 233 | + "wheelchairAccessibleRestroom" : false, |
| 234 | + "wheelchairAccessibleSeating" : false |
| 235 | + }, |
| 236 | + "googleMapsLinks" : { |
| 237 | + "directionsUri" : "", |
| 238 | + "placeUri" : "", |
| 239 | + "writeAReviewUri" : "", |
| 240 | + "reviewsUri" : "", |
| 241 | + "photosUri" : "" |
| 242 | + } |
| 243 | +} ] |
| 244 | +``` |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | +<hr /> |
| 250 | + |
| 251 | +# Additional Instructions |
| 252 | + |
| 253 | +## Connection Setup |
| 254 | + |
| 255 | +### Enable Geocoding API, Places API and Routes API |
| 256 | + |
| 257 | +1. In the [Google Cloud Console](https://console.cloud.google.com/), select your project. |
| 258 | +2. Click this icon. |
| 259 | +3. Click on **APIs & Services**. |
| 260 | +4. Enter **Geocoding API** in search bar. |
| 261 | +5. Click on **Geocoding API**. |
| 262 | +6. Click on **Enable**. |
| 263 | +7. Enter **Places API** in search bar. |
| 264 | +8. Click on **Places API**. |
| 265 | +9. Click on **Enable**. |
| 266 | +10. Enter **Routes API** in search bar. |
| 267 | +11. Click on **Routes API**. |
| 268 | +12. Click on **Enable**. |
| 269 | + |
| 270 | + |
| 271 | +<div style={{ position: 'relative', height:0, width: '100%', overflow: 'hidden', zIndex: 99999, boxSizing: 'border-box', paddingBottom: 'calc(50.05219207% + 32px)'}}> |
| 272 | + <iframe src="https://www.guidejar.com/embed/8f4f75b3-b4f9-43bd-a50e-6344dc2d298d?type=1&controls=on" width="100%" height="100%" style={{height:'100%', position:'absolute', inset:0}} allowfullscreen frameborder="0"></iframe> |
| 273 | +</div> |
0 commit comments