Every time I run the webserver the markers are not displayed when i use MarkerWithLabel. In the developer tool, the error is undefined MarkerWithLabel. From the documentation of MarkerWithLabel, I feel the code is right but I cant get any marker. But when I use maps.google.Marker i get all markers and names but i cant get the image of the url i have included.

Any suggestion would be a huge help. Been stuck with it for hours and I cant find any possible errors from frequently asked questions with respect to addmarker

var image = "https://maps.google.com/mapfiles/kml/pal2/icon31.png";

var marker = new MarkerWithLabel({
    position: {lat: parseFloat(place.latitude), lng: parseFloat(place.longitude)},
    map: map,
    labelContent: place.place_name,
    icon: image,
    labelAnchor: new google.maps.Point(20, 0),
    labelClass: "labels"

MarkerWithLabel is not part of Google maps APIs, it is a third party product. Here's the doc for Google Marker Labels. IMO don't let this detail distract from completing the pset.


But to complete the pset we need to label the markers with the city names as in the staff's solution, right?

You must log in to answer this question.

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