Adding custom marker text to Google Map

后端 未结 3 372
时光说笑
时光说笑 2021-01-07 21:08

I\'m creating a new website for new law office.

I followed Google API for embedding maps. I added their address, but would like to add the name of the firm to the ma

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-07 21:35

    Yo can set the Latitude and Longitude of your marker and include a Title on it.

    var marker = new google.maps.Marker({
        position: new google.maps.LatLng(-25.363882,131.044922),
        map: map,
        title: 'Our Office'
    });
    

提交回复
热议问题