Does google maps provide the ability to create geofence in iOS?
Similar to this for Android: http://developer.android.com/training/location/geofencing.html
Thank you.
Does google maps provide the ability to create geofence in iOS?
Similar to this for Android: http://developer.android.com/training/location/geofencing.html
Thank you.
Just in case someone else end up here :
https://www.raywenderlich.com/136165/core-location-geofencing-tutorial
Geofencing notifies your app when its device enters or leaves geographical regions you set up. It lets you make cools that can trigger a notification whenever you leave home, or greet users with the latest and greatest deals whenever favorite shops are nearby. In this geofencing tutorial, you’ll learn how to use region monitoring in iOS with Swift – using the Region Monitoring API in Core Location.[...]
In swift 5 You can create the geofencing by using the Google Map Object. In the view did load or anywhere in the code where you want to initialize the path just instantiate the GMSMutablePath object
var path : GMSMutablePath!
//In viewdidload
path = GMSMutablePath()
let lat = Double(i.latitude ?? "0") ?? 0.0
let lng = Double(i.longitude ?? "0") ?? 0.0
print(lat,lng)
path.add(CLLocationCoordinate2D(latitude: lat, longitude: lng))
let polyline = GMSPolyline(path: path)
polyline.strokeColor = AppColor.authFontColor
polyline.strokeWidth = 3.0
polyline.map = googleMapView