Map.GetTile (gb.map)
Function GetTile ( Name As String ) As _MapTile
Sinds 3.13
Returns an existing
_MapTile Layer object
This is an alternative method to fetch Map array elements. the GetShapeThis method returns a
_MapTile object, while fetching directly the Map array returns a
_MapLayer object.
-
Name - defines the Tile Layer name
Example:
Private hMap as New Map
Public Sub _New()
hMap.AddTile("OpenStreet", "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
hMap.GetTile("OpenStreet").Copyright = "OpenStreetMap contributors"
hMap.GetTile("OpenStreet").Opacity = 0.3
End
Public Sub DrawingArea1_Draw()
hMap.Width = Draw.Width
hMap.Height = Draw.Height
hMap.Draw()
End
instead of
Private hMap as New Map
Public Sub _New()
hMap.AddTile("OpenStreet", "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
hMap["OpenStreet"].Copyright = "OpenStreetMap contributors"
hMap["OpenStreet"].Opacity = 0.3
End
Public Sub DrawingArea1_Draw()
hMap.Width = Draw.Width
hMap.Height = Draw.Height
hMap.Draw()
End