I am using v3.
i have a PHP code like this:
foreach(..........)
{
echo "<script>createAndPlaceMarkers(" . $tip->venue->geolat . "," .
$tip->venue->geolong .");</script>";
}
my JavaScript:
function createAndPlaceMarkers(myLat, myLng){
var myMarkerPosition= new google.maps.LatLng(myLat,myLng);
//alert(' myLat= ' + myLat + ' myLng= ' + myLng + ' pos= ' +
myMarkerPosition);
var marker = new google.maps.Marker({
position: myMarkerPosition,
map: map
//title:"title"
});
marker.setMap(map);
}
......................
.......initialize()........
####### The dynamic markers are not getting displayed.. WHY ??
#########
When I uncomment the alert, I can see that I am getting proper values
from the PHP. BUT, don't know why it is not putting the markers.
When i write the same marker code in the initialize function, with a
static lat and lng value, the marker appears on the map!!
Please help..
And How can I clear/remove the markers/overlay ??
thanks
--
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.