I have a leaflet map, exported from QGIS. I don't want to modify the code inside that exported folder.
I successfully embedded the map inside another page, using a <iframe>
tag.
Now, I want, in the javascript code of my parent page, get the map variable so I cant tweak its parameters (position, bounds, etc...)
How can I get this map variable in my parent page javascript ?
parent
<iframe id = 'iframeid'
src="/qgis/index.html"
scrolling="no"
frameborder="0"
style="height: 100vh;
width: 100%">
</iframe>
<script>
var map = ????
</script>
child (qgis-exported leaflet map)
<script>
var map = L.map('map', {zoomControl:true, maxZoom:20, minZoom:15});
/* I need te following lines inside the parent file. */
var lat = -0.017;
var lng = 0.015;
var zoom = 16;
map.setView([lat, lng], zoom);
</script>