您好,具体可参考为地图设置投影:https://iclient.supermap.io/web/introduction/openlayersDevelop.html#multiProjection
加载4490的地图可以参考以下代码:
var swissProjection = new ol.proj.Projection({
code: "EPSG:4490",
extent:[73.45, 18.16, 134.98, 53.53],
units: "degrees",
});
new ol.supermap.MapService(url).getMapInfo(function (serviceResult) {
const mapObj = serviceResult.result;
map = new ol.Map({
target: "map",
view: new ol.View({
center: [116.402, 39.905],
zoom: 0,
projection:swissProjection ,
}),
});
var layer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest(
ol.source.TileSuperMapRest.optionsFromMapJSON(url, mapObj, true)
),
});
map.addLayer(layer);
});