0

I don't know why no markers are visible till now, I thought "label" was causing this then changed it to "labels" but nothing changed. Is there any mistake?

function addMarker(place)
{
 var placeLatLng = new google.maps.LatLng(parseFloat(place.latitude), parseFloat(place.longitude));

// add the marker to the map
var marker = new MarkerWithLabel({
    position: placeLatLng,
    map: map,
    labelContent: place.place_name + ", " + place.admin_code1,
    labelAnchor: new google.maps.Point(22, 0),
    labelClass: "label",
});
// add marker to markers[]
markers.push(marker);

}

1

I can see a mistake in the object you're passing to MarkerWithLabel function, I don't think a comma after "label" is needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .