In addition to the new KML, Traffic, and Bicycling layers, the recent
Maps API v3 update included a number of changes to existing property
names. Although briefly mentioned in Dan's post I wanted to draw your
attention to them, explain our reasons for making these changes, and
encourage you to update your existing applications accordingly, as the
old names will be removed in a future release.

Firstly, the DirectionsLeg.start_geocode and DirectionsLeg.end_geocode
properties have been replaced with four new properties.
DirectionsLeg.start_location and DirectionsLeg.end_location return
google.maps.LatLng objects for the start and end of the Leg, while
DirectionsLeg.start_address and DirectionsLeg.end_address return the
corresponding formatted text addresses.

Previously the start_geocode and end_geocode properties returned a
GeocoderResult for the addresses or latlngs given for the origin,
destination, or waypoints concerned. However these geocodes were
generated before the route was calculated, and consequently could be
some way away from the route returned if the address or latlng
concerned was not on a road. The LatLng objects returned by
start_location and end_location are the actual points on a street that
the route snapped to for the given origin, destination, or waypoint.

We have also attempted to address some inconsistencies in the way in
which LatLng properties are referenced in method names in the API.
DirectionsStep.start_point and DirectionsStep.end_point, which have
always returned LatLng objects, have been renamed to
DirectionsStep.start_location and DirectionsStep.end_location
respectively, both to be consistent with DirectionsLeg and to avoid
suggesting that they return a google.maps.Point object. In a similar
vein, GeocoderRequest.latLng has been renamed GeocoderRequest.location
to be consistent with GeocoderResult.geometry.location.

We have also renamed DirectionsRoute.optimized_waypoint_order to
DirectionsRoute.waypoint_order to reflect the fact that this property
is always set, regardless of whether the waypoint order has been
optimized.

As the Maps API v3 continues to evolve we are keen to keep the
interface clean and consistent. If while developing Maps API v3
applications you come across any aspects of the interface you feel are
not consistent we would love to hear about it. We can not guarantee
that we will implement every suggestion, but we will certainly
consider them.

Many thanks for your continued interest in the Maps API v3. With your
help we hope to continue making it ever better and more useful.

Thor Mitchell
Maps API Product Manager

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to