Google Maps geocoding (address to GLatLng)
Posted
by antosha
on Stack Overflow
See other posts from Stack Overflow
or by antosha
Published on 2010-06-08T02:28:13Z
Indexed on
2010/06/08
2:32 UTC
Read the original article
Hit count: 466
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 :)
© Stack Overflow or respective owner