0
Here is a CodePen demo我在Google地圖上顯示了一個多邊形,以及使用「地圖標籤」庫的標籤。我怎樣才能實現谷歌地圖的視網膜地圖標籤
除了我無法獲得標籤文本來呈現視網膜屏幕的正確分辨率,一切都很好。
如何獲取地圖標籤文本以在我的演示環境中顯示HiDPI屏幕?
似乎有一個已知的解決方案here但我無法弄清楚如何在我的演示中實現該功能。這可能是因爲我對JS的知識有限。我敢肯定別人可能會指出如何在瞬間做什麼。
這裏是我的代碼的預覽,但最好檢查CodePen demo:
/* GROUP MAP/STAGE/MAP LABEL
=================================================== */
/* Reference: https://googlemaps.github.io/js-map-label/docs/reference.html */
var mapLabel = new MapLabel({
text: 'Main Stage',
position: new google.maps.LatLng(51.420118, -0.064973),
map: map,
fontSize: 15,
fontColor: "#9c0058",
align: 'left',
});
mapLabel.set('position', new google.maps.LatLng(51.420118, -0.064973));