mapmyindia-maps-vectorSDK-android icon indicating copy to clipboard operation
mapmyindia-maps-vectorSDK-android copied to clipboard

unable to set maxRadius for Gefencing

Open vivek-np opened this issue 1 year ago • 0 comments

hi i am unable to set maxRadius for GeoFenceView

i am trying to set radius of 500000 which is 500km but its not setting properly. kindly guide how to set it properly

here is my code

 mRadius= intent.getIntExtra(AppConstantCollection.EXTRA_NEARBY_RADIUS, 10000)
        Timber.d("Radius for Circle  : $mRadius")
        geoFence = GeoFence()
        val geoFenceOptions = GeoFenceOptions.builder().apply {
            maxRadius(mRadius+10000)
            showToolsButton(false)
            showSeekBar(false)
            enableCircleDrag(false)
            showPolygonCentreIcon(false)
        }
        geofenceView = GeoFenceView(this, geoFenceOptions.build())
        geofenceView.geoFence = geoFence
        binding.fragmentContainer.addView(geofenceView)
        geofenceView.onCreate(savedInstanceState)

vivek-np avatar May 31 '24 06:05 vivek-np