Skip to Content
0

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

Jan 10, 2017 at 01:48 PM

51

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers