Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private MapPane1 As MapPane
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Title="jFXtrasMapPane demo"
' the offline tiles used in this example can be downloaded from
' http://b4j.martinpearman.co.uk/jfxtras.labs.map/tiles/map_of_the_uk.zip
' be sure to modify the path to the offline tiles in CustomTileSource1.Initialize2
Dim CustomTileSource1 As CustomTileSource
CustomTileSource1.Initialize2("Panorama", "C:\Users\martin\Programming\Basic4Java\jFXtrasMapPane\CustomTileSource-demo\map_of_the_uk", 0, 3)
' the offline custom tiles are JPG images
' so i'll use a CustomTilePathBuilder so jpg tiles are requested
' (by default png tile are requested)
Dim CustomTilePathBuilder1 As CustomTilePathBuilder
CustomTilePathBuilder1.Initialize
CustomTilePathBuilder1.SetTileType("jpg")
CustomTileSource1.SetTilePathBuilder(CustomTilePathBuilder1)
MapPane1.Initialize3("", CustomTileSource1, 0, 0, 640, 480, 0)
MapPane1.SetDisplayPositionByLatLon(0, 0)
MainForm.RootPane.AddNode(MapPane1, 0, 0, 640, 480)
MainForm.Show
End Sub