可以参考OpenLayers的示例:https://iclient.supermap.io/examples/openlayers/editor.html#01_tiledMapLayer4326
var map = new ol.Map({
target: 'map',
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
view: new ol.View({
center: [100, 0],
zoom: 3,
projection: 'EPSG:4326',
multiWorld: true
})
});
var layer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: "https://iserver.supermap.io/iserver/services/map-world/rest/maps/World",
wrapX: true
}),
projection: 'EPSG:4326'
})
map.addLayer(layer);