Hi
This is part of my code:
var previousMarkerLocation1 = '(16.88294426621386,
-47.1533203125)';
var previousMarkerLocation2 =
previousMarkerLocation1.replace(')','');
var previousMarkerLocation3 =
previousMarkerLocation2.replace('(','');
var latlngStr = previousMarkerLocation3.split(",",2);
var lat = parseFloat(latlngStr[0]);
var lng = parseFloat(latlngStr[1]);
var OldLatlng = new google.maps.LatLng(lat, lng);
addMarker(OldLatlng);
function addMarker(location) {
if(markers.length<1) {
marker = new google.maps.Marker({
position: location,
icon: 'square.png',
map: map
});
markers.push(marker);
1: showRevGeoCodeInfo(location);
2:
document.getElementById('markerInfo').markerLocation1.value=location;
}
}
All I need is for a marker to be shown at previousMarkerLocation1....The
errors I get are:
Uncaught TypeError: Cannot call method 'geocode' of undefined for the line
marked 1: above and if I comment that line out, I get
Uncaught TypeError: Cannot read property 'markerLocation1' of null for line
2:
Can anyone assist? Many thanks
Tom.
--
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.