簡體   English   中英

文字未顯示在Google地圖標記的標簽上

[英]text is not showing on label on google map marker

問題很簡單,一切正常,唯一的問題是:
標記和標簽顯示在Google地圖上,但標簽文本未顯示,這是我完整的代碼: http : //jsfiddle.net/abhbha/cd4h3yyo/3/

function initialize(lat1, long1) {
    var markers = [
    {
            "propid": "117",
            "title": " Title 1 ",
            "lat": "28.683441130339858000",
            "lng": "77.316357372033620000",
           },
            {
                "propid": "116",
                "title": " Title 2",
                "lat": "28.905853091546845000",
                "lng": "78.470265147912530000"
            },
            {
                "propid": "115",
                "title": " Title 3",
                "lat": "28.986857208298716000",
                "lng": "77.712208507287530000",
            }];

    var mapOptions = {
        center: new google.maps.LatLng(lat1, long1),
        zoom: 12,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
    };
    var infoWindow = new google.maps.InfoWindow();
    var map = new google.maps.Map(document.getElementById("gmap"), mapOptions);
    for (i = 0; i < markers.length; i++) {
        var data = markers[i]
        var myLatlng = new google.maps.LatLng(data.lat, data.lng);
        var marker = new MarkerWithLabel({
            position: myLatlng,
            map: map,
            //icon: '/img/sticker/empty.png',
            //shadow: '/img/sticker/bubble_shadow.png',
            //transparent: '/img/sticker/bubble_transparent.png',
            title: data.title,
            labelContent: " jhdgfjdgh ",
            labelClass: "labels",
            labelVisible: true,
            labelInBackground: false,
        });
    }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM