Hello,
Many thanks for that. The map code is here.
Tried what you suggested but it didn't work. I think maybe flightPath
isn't set up as a global. I've read this
http://blog.ramonlechuga.com/2010/08/12/private-public-properties-for-javascript/
but can't make head nor tail of it. Understand the principle of
public / private vars just usually don't work with javascript.
Many Thanks,
Richard
<script type="text/javascript">
function initialize() {
var myOptions = {
scaleControl: true,
streetViewControl: false,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl:
true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
},
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var map = new
google.maps.Map(document.getElementById("map_canvass"), myOptions);
var southWest = new google.maps.LatLng(37.231864,-3.791990);
var northEast = new google.maps.LatLng(44.253835,-0.904276);
var bounds = new google.maps.LatLngBounds(southWest,northEast);
map.fitBounds(bounds);
var BikeCoordinates = [new google.maps.LatLng(44.253835,
-0.904276),new google.maps.LatLng(42.169935, -1.949879),new
google.maps.LatLng(40.087353, -3.000221) ];
var flightPath = new google.maps.Polyline({
path: BikeCoordinates,
strokeColor: "#FF0000",
strokeOpacity: 1.0,
strokeWeight: 2
});
flightPath.setMap(map);
}
</script>
On Nov 2, 10:48 pm, Chad Killingsworth