在這裏可以使用自定義地圖貼圖。你可以找到如何在這裏做一個例子:
https://developer.here.com/api-explorer/maps-js/v3.0/infoBubbles/custom-tile-overlay
我建議您查看完整的例子,但在任何情況下,關鍵點是這些:
1)創建瓷磚供應商,並指定URL格式
var tileProvider = new H.map.provider.ImageTileProvider({
// We have tiles only for zoom levels 12â€「15,
// so on all other zoom levels only base map will be visible
min: 12,
max: 15,
getURL: function (column, row, zoom) {
... omitted
// The Old Berlin Map Tiler follows the TMS URL specification.
// By specification, tiles should be accessible in the following format:
// http://server_address/zoom_level/x/y.png
return 'tiles/'+ zoom+ '/'+ row + '/'+ column+ '.png';
}
}
});
2)創建的層,並添加我噸至地圖
// Now let's create a layer that will consume tiles from our provider
var overlayLayer = new H.map.layer.TileLayer(tileProvider, {
// Let's make it semi-transparent
opacity: 0.5
});
// Finally add our layer containing old Berlin to a map
map.addLayer(overlayLayer);
很有前途,我現在要試試這個。非常感謝您的回答!我在原始問題中忘記了是否有一種方法可以用我的自定義切片以某種方式使用UTF Grid? – Tamas
不能幫助你,我不知道:/ – SirBif
太棒了!它像一個魅力工作,謝謝你! – Tamas