Created
January 13, 2021 17:45
-
-
Save rogergcc/82bbfc5b1073adfc18f8728b2976b5de to your computer and use it in GitHub Desktop.
private ArrayList<LocationModel> locationModels = new ArrayList<>();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geofenceList.add(new Geofence.Builder() | |
// Set the request ID of the geofence. This is a string to identify this | |
// geofence. | |
.setRequestId(locationModel.getLat() + locationModel.getLon()) | |
.setCircularRegion( | |
Double.parseDouble(locationModel.getLat()), | |
Double.parseDouble(locationModel.getLon()), | |
(float) Double.parseDouble(String.valueOf(documentSnapshot.getData().get("radius"))) | |
) | |
.setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER) | |
.setExpirationDuration(Geofence.NEVER_EXPIRE) | |
.setNotificationResponsiveness(1000) | |
.build()); | |
circle = mMap.addCircle(new CircleOptions() | |
.center(new LatLng(Double.parseDouble(locationModel.getLat()) | |
, Double.parseDouble(locationModel.getLon()))) | |
.radius(Double.parseDouble(String.valueOf(documentSnapshot.getData().get("radius")))) | |
// .strokeColor(getResources().getColor(R.color.lignt_primary)) | |
.strokeColor(ContextCompat.getColor(this, R.color.circle_strok)) | |
.strokeWidth(4.f) | |
// .fillColor(getResources().getColor(R.color.lignt_primary))); | |
.fillColor(ContextCompat.getColor(this, R.color.circle_fill))); | |
locationModels.add(locationModel); |
Author
rogergcc
commented
Jan 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment