Hi All,
Todays question.
The following sub from B4A does not work because in B4A because gmap.maptype = expects an interger.
In B4J gmap.maptype = apparently expects com.lynden.gmapsfx.javascript.object.MapTypeIdEnum. ???
The Library gives the following details but no sample/demo code:
MAP_TYPE_HYBRID As com.lynden.gmapsfx.javascript.object.MapTypeIdEnum
MAP_TYPE_NORMAL As com.lynden.gmapsfx.javascript.object.MapTypeIdEnum
MAP_TYPE_SATELLITE As com.lynden.gmapsfx.javascript.object.MapTypeIdEnum
MAP_TYPE_TERRAIN As com.lynden.gmapsfx.javascript.object.MapTypeIdEnum
MapType As Object [write only]
Sets the map type. The value should be one of the MAP_TYPE constants.
I have tried without sucess:
gmap. MAP_TYPE_SATELLITE = ???
gmap.MapType = ????
Can someone please give me a clue.
Regards Roger
Todays question.
The following sub from B4A does not work because in B4A because gmap.maptype = expects an interger.
In B4J gmap.maptype = apparently expects com.lynden.gmapsfx.javascript.object.MapTypeIdEnum. ???
The Library gives the following details but no sample/demo code:





Sets the map type. The value should be one of the MAP_TYPE constants.
I have tried without sucess:
gmap. MAP_TYPE_SATELLITE = ???
gmap.MapType = ????
Can someone please give me a clue.
Regards Roger
B4X:
Sub BtnMapType_action
If MapTypeInt = 1 Then
MapTypeInt = 4 'Change map to satellite with labels for locations and roads etc.
Else
MapTypeInt = 1 'Change map to standard road map
End If
MapZoom = gmap.CameraPosition.Zoom
MapCenter = gmap.CameraPosition.Target
MapLat = MapCenter.Latitude
MapLng = MapCenter.Longitude
gmap.maptype = MapTypeInt
End Sub