Sapui5 如何更改SAP Visual Business GeoMap中的地图类型?
据此,我使用此配置在GeoMap中添加以下地图:Sapui5 如何更改SAP Visual Business GeoMap中的地图类型?,sapui5,here-api,Sapui5,Here Api,据此,我使用此配置在GeoMap中添加以下地图: var oMapConfig = { "MapProvider": [{ "name": "HEREMAPS", "type": "HERETerrainMap", "description": "", "tileX": "256", "tileY": "256", "maxLOD": "20", "copyright": "Tiles Courtesy of HERE Maps",
var oMapConfig = {
"MapProvider": [{
"name": "HEREMAPS",
"type": "HERETerrainMap",
"description": "",
"tileX": "256",
"tileY": "256",
"maxLOD": "20",
"copyright": "Tiles Courtesy of HERE Maps",
"Source": [{
"id": "s1",
"url": "https://1.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/reduced.day/{LOD}/{X}/{Y}/256/png8?app_id=MY_ID&app_code=MY_CODE"
}, {
"id": "s2",
"url": "https://2.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/reduced.day/{LOD}/{X}/{Y}/256/png8?app_id=MY_ID&app_code=MY_CODE"
}
]
}],
"MapLayerStacks": [{
"name": "DEFAULT",
"MapLayer": {
"name": "layer1",
"refMapProvider": "HEREMAPS",
"opacity": "1.0",
"colBkgnd": "RGB(255,255,255)"
}
}]
};
this.oMap.setMapConfiguration(oMapConfig);
this.oMap.setRefMapLayerStack("DEFAULT");
但我的地图是黑白的:
我想要的是标准地图:
在中,提供了新的服务器URL,我已经尝试过了,但不起作用
{
"id": "s1",
"url": http://1.maps.nlp.nokia.com/maptile/2.1/maptile/newest/normal.day/{LOD}/{X}/{Y}/256/png?app_id=YOUR_APP_ID&app_code=YOUR_APP_CODE"
}, {
"id": "s2",
"url": "http://2.maps.nlp.nokia.com/maptile/2.1/maptile/newest/normal.day/{LOD}/{X}/{Y}/256/png?app_id=MY_APP_ID&app_code=MY_APP_CODE"
}
在中找不到MapProvider配置文档,只需在地图URL中将
reduced.day
更改为normal.day
,即可获得彩色地图:)
编辑:
有关详细的API,请参阅