Hallo,
I have a probelm with adding latitude and longitude to a array and then to draw a polyline with these entries.
My code:
Code:
var lat = geo.getLatitude();var longt = geo.getLongitude();
route.push( new google.maps.LatLng( lat +', ' + longt ) );
alert(route);
//marker.setPosition(lat + ', ' + longt);
if (polyline) {
polyline.setMap(null);
}
polyline = new google.maps.Polyline({
path : route,
strokeColor: "red",
strokeOpacity: 1.0,
strokeWeight: 5
});
polyline.setMap(map),
In the alert I get the parameters (NaN, NaN) instead of (41.234153, 16.4354356)
Can somebody help me?
Thanks
Sebastian