Tobias
07/31/2024, 11:57 AMexpected fun MapView()
in my common code and have implemented them in iOS with using UIKitView
. How is this generally done with ComposeWeb? I have found some solutions that use an third-party HtmlView
for example, but not sure if this is the current way to go.Frank Bouwens
07/31/2024, 12:39 PMTobias
07/31/2024, 12:47 PM<div id="map"></div>
<script>
var map = new maplibregl.Map({
container: 'map', // container id
style: '<https://demotiles.maplibre.org/style.json>', // style URL
center: [0, 0], // starting position [lng, lat]
zoom: 1 // starting zoom
});
</script>
So far, this is clear. My problem is rather how I would use or “translate” this for my Compose Web application? Do I need to create a JsModule or somehow use js(…)
. I am confused and grateful for any pointers on how to proceed. There is lots of code out there, but a lot seems to be legacy.Konstantin Tskhovrebov
07/31/2024, 12:49 PMTobias
07/31/2024, 12:53 PMHtmlView
when integrating JS map library?