A simple example to get started using MapView:
<script>
function send () {
var cmd = { "clear": "all", "namedmarkers": { "markername": { "title": "Marker title", "appendpoints": [[53.90557, 27.45642], [53.90951, 27.45633], [53.91391, 27.45968], [53.91695, 27.46904], [53.91573, 27.47599], [53.91422, 27.46784], [53.91179, 27.46285], [53.91235, 27.46751], [53.91170, 27.47155], [53.90973, 27.46262], [54.844636600000015, 21.426025400000015]], "label": "markerlabel" } } }
document.getElementById('map').contentWindow.postMessage(`MapView|cmd:${JSON.stringify(cmd)}`, '*')
}
window.addEventListener('message', function (event) {
console.log(event)
if (typeof event.data === 'string' && event.data.indexOf('MapView|') === 0) {
var cmd = {}
try {
cmd = JSON.parse(event.data.replace('MapView|state:', ''))
} catch (e) {
}
if (cmd.ready) {
send()
}
}
})
</script>
<iframe id="map" src="https://flespi.io/mapview/" frameborder="0" style="height:500px;width:100%" allowfullscreen></iframe>
Also you can read article about mapview