Hi I am testing out Google maps and have the map working with ground overlays and UrlTileProvider but cant seem to get it to show a CustomTileProvider
I have this code in B4XPage_Created
B4X:
Wait For (InitializeMap) Complete (Success As Boolean)
MapReady = Success
If MapReady Then
CustomTileProvider1.Initialize(Null, "Get_Tile")
TileOverlayOptions1.Initialize
TileOverlayOptions1.SetTileProvider(CustomTileProvider1)
TileOverlay1 = GoogleMapsExtras1.AddTileOverlay(GoogleMap1, TileOverlayOptions1)
Log("CustomTileProvider1.IsInitialized " & CustomTileProvider1.IsInitialized)
Log(TileOverlay1.IsVisible)
end if
CustomTileProvider1.IsInitialized returnsTrue and TileOverlay1.IsVisible returns True but the
the Get Tile sub doesnt seem to be reached as it wont log as below.
B4X:
Sub Get_Tile(TileX As Int, TileY As Int, Zoom As Int) As Tile
Log("GetTile X="&TileX&", Y"&TileY&", Zoom="&Zoom)...
Still haven't been able to figure this one out, does anyone have a working example of a CustomTileProvider for google maps.
It was mentioned here as well but I cant see a solution. https://www.b4x.com/android/forum/threads/googlemapsextras.26277/post-331570
Really hoping I can find a way of showing maps offline, can get ground overlays to show but dont think for larger areas they will be appropriate.