【问题标题】:Google maps how to add MapLabel above maps [duplicate]谷歌地图如何在地图上方添加 MapLabel [重复]
【发布时间】:2014-08-25 14:40:29
【问题描述】:

我使用 google map api 并使用 MapLabel 添加文本,如何在地图上方添加文本。现在我在地图下发短信。

地图标签功能:

    var mapLabel = new MapLabel({
      text: 'Test0000001',
      position: new google.maps.LatLng(61.52401, 105.31875600000001),
      map: map,
      fontSize: 100,
      align: 'center'
    });

完整代码jsfiddle:http://jsfiddle.net/16khyyj0/

【问题讨论】:

    标签: google-maps


    【解决方案1】:

    您需要替换maplabel.js 文件中的一行:

    来自

    mapPane.appendChild(canvas);
    

    到:

    floatPane.appendChild(canvas);
    

    Source

    【讨论】:

    • 成功了,谢谢 :)
    猜你喜欢
    • 2015-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-14
    • 1970-01-01
    相关资源
    最近更新 更多