Oct 11, 2017 This method allows to set a custom style to the map. Step 1: Create the style with the wizard and save the json string in a file: https://mapstyle.withgoogle.com/ Step 2: Set the style after the map is ready: Code: SetMapStyle(File.ReadString(File.DirAssets, "style.txt")) Code: Code: Sub SetMapStyle(style As String) Dim jo As JavaObject = gmap jo = jo.GetField("map") jo.GetFieldJO("jsObject").RunMethod("eval", Array($" this.setOptions({ styles: ${style} }); "$)) End Sub Last edited: Jul 29, 2019 Click to expand...
This method allows to set a custom style to the map. Step 1: Create the style with the wizard and save the json string in a file: https://mapstyle.withgoogle.com/ Step 2: Set the style after the map is ready: Code: SetMapStyle(File.ReadString(File.DirAssets, "style.txt")) Code: Code: Sub SetMapStyle(style As String) Dim jo As JavaObject = gmap jo = jo.GetField("map") jo.GetFieldJO("jsObject").RunMethod("eval", Array($" this.setOptions({ styles: ${style} }); "$)) End Sub