'Static code module
Sub Process_Globals
Public vuetify As VuetifyApp
Public home As VueComponent
Public path As String
Public name As String = "home"
Private banano As BANano
Private LeafletMap As BANanoLeafletMap
Private mapcontainer As VueElement
End Sub
Sub Initialize
'establish a reference to the app
vuetify = pgIndex.vuetify
'initialize the component
home.Initialize(Me, name)
home.vuetify = vuetify
'make this the start page
home.Path = "/"
path = home.path
'build the page html here
banano.LoadLayout(home.Here, "home")
'add a Leaflet map to the VueElement "div" container at runtime
home.SetMounted(Me, "onmounted", Null)
'add this route component to the app
vuetify.AddRoute(home)
End Sub
Sub onmounted
banano.GetElement("#mapcontainer").Empty
LeafletMap.Initialize("#mapcontainer")
LeafletMap.SetStyle($"{ "width": "100%", "height": "230px", "z-index": "0" }"$)
' add a TileLayer...
Dim TileLayer As BANanoLeafletTileLayer
TileLayer.Initialize
LeafletMap.AddTileLayer(TileLayer)
LeafletMap.PanTo(50.703416,6.634032)
LeafletMap.SetZoom(5)
End Sub