In short, the code I've got is almost identical to that given on the maps api page, yet no markers show up on the map. So what's wrong with this:
function addMarker(place)
{
var myLatLng = {lat: parseFloat(place.latitude), lng: parseFloat(place.longitude)};
var name = place.place_name + ", " + place.admin_name1;
var marker = new google.maps.Marker({
posistion: myLatLng,
map: map,
title: name
});
markers.push(marker);
}
At this point I'm only trying to get the markers to show up - I know the use of title is wrong etc. Any help is appreciated, because to me this should be working. I've seen that most people use the MarkerWithLabel with function, however the link which points to its documentation in the spec is dead, so that could be the issue.
Thanks in advance for any pointers.
EDIT
I've now tried the method that utilises the MarkerWithLabel function, as it seems that is what is bundled with the distribution code. My code now reads as:
function addMarker(place)
{
var myLatLng = new google.maps.LatLng(place.latitude, place.longitude);
var name = place.place_name + ", " + place.admin_name1;
var marker = new MarkerWithLabel({
posistion: myLatLng,
map: map,
labelContent: name
});
markers.push(marker);
}
However, there are still no markers on the map.I see a few overlapping labels, but that is all. The map then locks up, and if I can into the console tab I see the following:
Where the number of errors goes up whenever I use the scroll wheel. I feel like I'm missing something very obvious, but I've hit a wall regardless. Any help appreciated.