/*** @license * 版权所有 2019 Google LLC。 * SPDX许可证标识符:Apache-2.0*/ function initMap() { const map = new google.maps.Map(document.getElementById("map"), { zoom: 18, center: { lat: 37.783, lng: -122.403 }, }); const bounds = { 17: [ [20969, 20970], [50657, 50658], ], 18: [ [41939, 41940], [101315, 101317], ], 19: [ [83878, 83881], [202631, 202634], ], 20: [ [167757, 167763], [405263, 405269], ], }; const imageMapType = new google.maps.ImageMapType({ getTileUrl: function (coord, zoom) { console.log("coord",coord) return [ "https://www.gstatic.com/io2010maps/tiles/5/L2_", zoom, "_", coord.x, "_", coord.y, ".png", ].join(""); }, tileSize: new google.maps.Size(256, 256), }); //cosonle.log("imageMapType",imageMapType) map.overlayMapTypes.push(imageMapType); } window.initMap = initMap;
请提供一个在react-native中使用react-native-map的urlTiles的答案
雷雷