Skip to Content
avatar image
Former Member

Geomaps with spots but map is not rendering, trying to configure GoogleMap Provider

Hi,

I am trying to use SAPUI5 control GeoMaps referring the below link, but the map is not getting render only spots are coming.

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.vbm.sample.GeoMapSpots/preview

I tried to use Google Map Provider for map configuration and using the below code for the same, but even then the map is not getting rendered

var oGeoMap = this.getView().byId("GeoMap");

var oMapConfig =

{ "MapProvider": [

{ "name": "GOOGLEMAPS",

"type": "HTTP", "description":

"Google Maps API",

"tileX": "256",

"tileY": "256",

"maxLOD": "20",

"WebIDEEnabled": "true",

"WebIDESystem": "false",

"copyright": "Tiles Courtesy of GOOGLE Maps",

"Source": [ { "id": "s1", "url": "https://maps.googleapis.com/maps/api/js?key=KEY" } ] }],

"MapLayerStacks":[

{ "name": "DEFAULT", "MapLayer":

{ "name": "GoogleMaps", "refMapProvider": "GOOGLEMAPS", "opacity": "1.0", "colBkgnd": "" } }] };

oGeoMap.setMapConfiguration(oMapConfig); oGeoMap.setRefMapLayerStack("DEFAULT");

oGeoMap.setInitialZoom(4);

oGeoMap.setInitialPosition("78.0000;21.0000;0");

Someone please help me to fix this issue.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers