Folks, in the snippet below, object marker_obj is created but with no
further reference that I see.
But beachMarker icon doesn't display unless marker_obj is indeed
defined.
Can someone explain the (apparently) invisible reference?
function init() {
// Called on the intiial page load.
var map_obj = new
google.maps.Map(document.getElementById('map_canvas'), {
zoom: 14,
center: new google.maps.LatLng(37.44, -122.14),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker_obj = new google.maps.Marker({
position: new google.maps.LatLng(37.43, -122.13),
map: map_obj
});
var image_file =
'http://code.google.com/apis/maps/documentation/v3/
examples/images/beachflag.png';
var beachMarker = new google.maps.Marker({
position: new google.maps.LatLng(37.45, -122.15),
map: map_obj,
icon: image_file
});
} // end function init()
--
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.