Possible Duplicate:
Google Map V3 : Only some markers are displayed
I need help with google maps.. I have the following code working with 1 property shown on the map, but I have many addresses/properties to show them on the same map and have no success.
var address = "<?php echo $address?>";
var map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 16
});
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
'address': address
},
function(results, status) {
if(status == google.maps.GeocoderStatus.OK) {
new google.maps.Marker({
position: results[0].geometry.location,
map: map
});
map.setCenter(results[0].geometry.location);
}
});
From php I get the address but JS side scripting is hard for me.. Please help and show me what needs to be changed so the adress to be JS array and how to show all addresses.