cancel
Showing results for 
Search instead for 
Did you mean: 

How to add additional layer on sap.ui,vbm.GeoMap?

Jayakrishnan
Active Participant
0 Kudos
638

Hi All,

I am working on SAPUI5 Custom application development. In this application i used sap.ui.vbm.GeoMap control to display the Geo Location information. I am consuming GeoServer services in my application. In GeoServer there are two types of services,(WFS and WMS). In WFS Services,it returns in GeoJson format. In WMS, the return format is like image/PDF/openLayer etc.

i am consuming both WFS and WMS in my application. I have two questions .

1. In WMS type--> can i have a option to add the OpenLayer on top of the vbm map control?.

2. In WFS Type--> i am getting the data in GeoJson Format. In SAPUI5 Documentation library i have seen an option for Adding GeoJsonLayer with Geomap control. But i tried with all the possibility, it doesn't working.

GeoJsonLayer code in my controller:

	$.ajax({
				type: "GET",
				url: sGeoServiceHectoMeterURL,


				dataType: "json",
				cache: false,


				success: function (result, status, xhr) {
					oHectoServiceCallBusyIndicator.close();
					delete result.crs;
					var oFeatureObject = result.features;
					var oGeoJsonLayer = new sap.ui.vbm.GeoJsonLayer({
						data: oFeatureObject
					});
					oGeoMap.addGeoJsonLayer(oGeoJsonLayer);
				},
				error: function (error) {
					oHectoServiceCallBusyIndicator.close();


					Log.error("Ajax Call Failed");
				}
			});

But i dont see any geojson layer on my geomap view on the screen.

Please help me to find a solution for this.

Thank you,

Regards,

JK.

Accepted Solutions (0)

Answers (1)

Answers (1)

sreehari_vpillai
Active Contributor
0 Kudos

Inspect this app

view-source:https://sapui5.hana.ondemand.com/test-resources/sap/ui/vbm/demosamples/sapapi_geomap_geojson.html

Jayakrishnan
Active Participant

Yes Have to, I altered the logic differently in my case added the spots instead of adding as layer. So did not check it.