Skip to content

Commit

Permalink
Fix for #75
Browse files Browse the repository at this point in the history
  • Loading branch information
domesticmouse committed Feb 22, 2016
1 parent 11ef6b7 commit 99b8bd8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/google/maps/model/Vehicle.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ public class Vehicle {
* {@code icon} contains the URL for an icon associated with this vehicle type.
*/
public String icon;

/**
* {@code local_icon} contains the URL for an icon based on the local transport signage.
*/
public String local_icon;
}
25 changes: 25 additions & 0 deletions src/test/java/com/google/maps/DirectionsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,4 +394,29 @@ public void testGeocodedWaypoints() throws Exception {

}

/**
* Test {@code local_icon} for Directions in Paris.
*/
@Test
public void testLocalIconInParis() throws Exception {
DirectionsResult result = DirectionsApi.newRequest(context)
.origin("paris metro bibliotheque francois mitterrand")
.destination("paris%20metro%20pyramides")
.mode(TravelMode.TRANSIT)
.await();
assertNotNull(result);
assertNotNull(result.routes);
assertNotNull(result.routes[0]);
assertNotNull(result.routes[0].legs);
assertNotNull(result.routes[0].legs[0]);
assertNotNull(result.routes[0].legs[0].steps);
assertNotNull(result.routes[0].legs[0].steps[0]);
assertNotNull(result.routes[0].legs[0].steps[0].transitDetails);
assertNotNull(result.routes[0].legs[0].steps[0].transitDetails.line);
assertNotNull(result.routes[0].legs[0].steps[0].transitDetails.line.vehicle);
assertNotNull(result.routes[0].legs[0].steps[0].transitDetails.line.vehicle.local_icon);
assertEquals("//maps.gstatic.com/mapfiles/transit/iw2/6/fr-paris-metro.png",
result.routes[0].legs[0].steps[0].transitDetails.line.vehicle.local_icon);
}

}

0 comments on commit 99b8bd8

Please sign in to comment.