You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-maps/tutorial-ev-routing.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ In this tutorial, you will:
26
26
> * Create and run a Jupyter Notebook file on [Azure Notebooks] in the cloud.
27
27
> * Call Azure Maps REST APIs in Python.
28
28
> * Search for a reachable range based on the electric vehicle's consumption model.
29
-
> * Search for electric vehicle charging stations within the reachable range, or isochrone.
29
+
> * Search for electric vehicle charging stations within the reachable range, or [isochrone].
30
30
> * Render the reachable range boundary and charging stations on a map.
31
31
> * Find and visualize a route to the closest electric vehicle charging station based on drive time.
32
32
@@ -103,7 +103,7 @@ from IPython.display import Image, display
103
103
104
104
A package delivery company operates a fleet that includes some electric vehicles. These vehicles need to be recharged during the day without returning to the warehouse. When the remaining charge drops below an hour, a search is conducted to find charging stations within a reachable range. The boundary information for the range of these charging stations is then obtained.
105
105
106
-
The requested routeType is eco to balance economy and speed. The following script calls the [Get Route Range API] of the Azure Maps routing service, using parameters related to the vehicle's consumption model. The script then parses the response to create a polygon object in GeoJSON format, representing the car's maximum reachable range.
106
+
The requested routeType is eco to balance economy and speed. The following script calls the [Get Route Range] API of the Azure Maps routing service, using parameters related to the vehicle's consumption model. The script then parses the response to create a polygon object in GeoJSON format, representing the car's maximum reachable range.
107
107
108
108
```python
109
109
subscriptionKey ="Your Azure Maps key"
@@ -146,9 +146,9 @@ boundsData = {
146
146
147
147
## Search for electric vehicle charging stations within the reachable range
148
148
149
-
After determining the electric vehicle's reachable range (isochrone), you can search for charging stations within that area.
149
+
After determining the electric vehicle's reachable range ([isochrone]), you can search for charging stations within that area.
150
150
151
-
The following script uses the Azure Maps [Post Search Inside Geometry API] to find charging stations within the vehicle’s maximum reachable range. It then parses the response into an array of reachable locations.
151
+
The following script uses the Azure Maps [Post Search Inside Geometry] API to find charging stations within the vehicle’s maximum reachable range. It then parses the response into an array of reachable locations.
152
152
153
153
```python
154
154
# Search for electric vehicle stations within reachable range.
@@ -208,7 +208,7 @@ display(Image(poiRangeMap))
208
208
209
209
First, identify all the potential charging stations within the vehicle’s reachable range. Next, determine which of these stations can be accessed in the shortest possible time.
210
210
211
-
The following script calls the Azure Maps [Matrix Routing API]. It returns the vehicle's location, travel time, and distance to each charging station. The subsequent script parses this response to identify the closest charging station that can be reached in the least amount of time.
211
+
The following script calls the Azure Maps [Matrix Routing] API. It returns the vehicle's location, travel time, and distance to each charging station. The subsequent script parses this response to identify the closest charging station that can be reached in the least amount of time.
212
212
213
213
```python
214
214
locationData = {
@@ -237,7 +237,7 @@ closestChargeLoc = ",".join(str(i) for i in minDistLoc)
237
237
238
238
## Calculate the route to the closest charging station
239
239
240
-
Once you've located the nearest charging station, use the [Get Route Directions API] to obtain detailed directions from the EV's current location. Run the script in the next cell to generate and parse a GeoJSON object representing the route.
240
+
Once you've located the nearest charging station, use the [Get Route Directions] API to obtain detailed directions from the EV's current location. Run the script in the next cell to generate and parse a GeoJSON object representing the route.
241
241
242
242
```python
243
243
# Get the route from the electric vehicle's current location to the closest charging station.
@@ -257,7 +257,7 @@ routeData = {
257
257
258
258
## Visualize the route
259
259
260
-
To visualize the route, use the [Get Map Image API] to render it on the map.
260
+
To visualize the route, use the [Get Map Image] API to render it on the map.
261
261
262
262
```python
263
263
destination = route[-1]
@@ -315,17 +315,15 @@ To learn more about Azure Notebooks, see
0 commit comments