I am creating a map using the new(ish) v3 of the Google Maps API
I have managed to get a map displaying using code as below:
var myLatlng = new google.ma
Well I think I have solved it, however if it is a stupid way of doing it please leave an answer!
I ended up using
var poiJson = echo $jsonArray ?>;
for (var i = 0;i < poiJson.length; i += 1) {
var lat = poiJson[i].poiLat;
var lon = poiJson[i].poiLon;
addMarker(lat,lon,i);
};
function addMarker(lat,lng,no){
var latlng = new google.maps.LatLng(lat,lng);
var marker = new google.maps.Marker({
position: latlng,
map: map
});
};