永远不会显示标记标签

时间:2015-08-14 06:43:32

标签: google-maps

我正在尝试添加MarkerOptions中指定标签的标记,但我从未在图标中看到标签。我知道有一个MarkerWithLabel类,但对于我的目的,标准标签就足够了,这就是文档描述它的方式......

  vGeocoder.geocode( { 'address': vStart}, function(results, status) {
     if (status == google.maps.GeocoderStatus.OK) {
        vStartMarker = new google.maps.Marker({
            map: vMap,
            position: results[0].geometry.location,
            label: 'A',
            icon: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png"
        });

        vMap.setCenter(results[0].geometry.location);
        vMap.setZoom(8);
     } else { alert('Geocode was not successful for the following reason: ' + status); }
  });

0 个答案:

没有答案