iOS Question Google maps methods help

Sasuke Sama

Active Member
Licensed User
Hi
I need to get three things from Google maps :

First
I need the code that moves the camera to the user location i found a b4a code which worked great but unfortunately not in b4i
.
.
Second
I need to get the snippet click event if there's any so for example when i click on a snippet i want to show more info about it
.
.
Third
I want to use a custom icon for the snippet and not the default icon if possible
.
.
And finally thank you in advance any help would be great
 

Sasuke Sama

Active Member
Licensed User
1.
B4X:
Dim MyLocation As LatLng = gmap.MyLocation
If MyLocation.IsInitialized Then
   Dim cp As CameraPosition
   cp.Initialize(MyLocation.Latitude, MyLocation.Longitude, gmap.CameraPosition.Zoom)
   gmap.MoveCamera(cp)
End If
2. Check InfoWindowClick event.

3. Use AddMarker3.
Cool thanx will try them out and report
 

web-yacht

Member
Licensed User
Hi,
i'm trying to use your code

B4X:
Dim MyLocation As LatLng = gmap.MyLocation
If MyLocation.IsInitialized Then
   Dim cp As CameraPosition
   cp.Initialize(MyLocation.Latitude, MyLocation.Longitude, gmap.CameraPosition.Zoom)
   gmap.MoveCamera(cp)
End If
but i receive this error on gmap.MoveCamera(cp) row:

B4X:
Error occurred on line: 274 (Main)
-[GMSCameraPosition applyToCamera:onMap:]: unrecognized selector sent to instance 0x76aa3f0
 
Top