cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use Leaflet is Geo Map ui5?

barnabas_toth
Explorer
0 Kudos

I try to find a way to use a map in my ui5 application, what can handle WMTS tiles. What could be the best solution? I tried leaflet, but i couldn't use it inside geo map. I would be grateful if you could help me.

Accepted Solutions (0)

Answers (2)

Answers (2)

barnabas_toth
Explorer
0 Kudos

thank you yoganandamuthaiah!

That works. My main goal is to use it together with Geo Map. https://sapui5.hana.ondemand.com/#/entity/sap.ui.vbm.GeoMap

So I use the functions of Geo Map, but because I'm not sure it can handle any wmts map, I would use leaflet.

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

barnabashub

Yes, it is possible to use Leaflet in SAP UI5. You can use the Leaflet API to create a map and add WMTS tiles to it. Here is a sample code for creating a Leaflet map with WMTS tiles:

// Create a new Leaflet map
var map = L.map('map', {
    center: [51.505, -0.09],
    zoom: 13
});

// Add WMTS tiles to the map
var wmtsLayer = L.tileLayer.wmts('http://example.com/wmts/{z}/{x}/{y}.png', {
    format: 'image/png',
    tileSize: 256,
    attribution: '© My Map Provider'
});

map.addLayer(wmtsLayer);