Google Maps geocoding (address to GLatLng)
- by antosha
Hi, I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points.
<script type="text/javascript">// <![CDATA[
var polyOptions = {geodesic:true};
var polyline = new GPolyline([
new GLatLng(),
new GLatLng()
], "#f36c25", 5, 0.8, polyOptions);
map.addOverlay(polyline);
if (GBrowserIsCompatible()) {
map.addOverlay(polyline);
}
// ]]></script>
Could someone tell me how can I dynamically geocode an address into GLatLng coordinates? (I am a little confused after reading Google's API documentation http://code.google.com/apis/maps/documentation/javascript/v2/services.html)
Thanks :)