How to add custom marker on Google Maps?

here is my code for adding marker images on the map
function addMarker(position, pathToPinImage, resultMap) {
 var marker = new google.maps.Marker({
 position: position,
 icon: pathToPinImage,
 map: resultMap

how to add not only pictures, but also text, links, that is, as the div to the marker was?
June 27th 19 at 15:08
1 answer
June 27th 19 at 15:10
At the time he was puzzled on this subject and wrote a detailed manual:

Look, there is the answer to your question - how to make your div with the content.

Find more questions by tags FrontendGoogle MapsHTMLJavaScript