-1

I have used custom circle to draw Geo fencing, but some time Google it self shows its default light blue Geo fence circle.
It create problem, like its displaying 2 radius in my map.

So how can I remove default Geo fencing in my application.

MrUpsidown
  • 21,592
  • 15
  • 77
  • 131

1 Answers1

2

use map.setMyLocationEnabled(false); and create your own marker to display current location

googleMap.OnMyLocationChangeListener locationListener = new GoogleMap.OnMyLocationChangeListener() {

            @Override
            public void onMyLocationChange(Location location) {
            drawMarker(location);

            private void drawMarker(Location location) {

                LatLng currentPosition = new LatLng(location.getLatitude(),
                        location.getLongitude());
                map.addMarker(new MarkerOptions()
                        .position(currentPosition)
                        .icon(BitmapDescriptorFactory
                                .defaultMarker(BitmapDescriptorFactory.HUE_AZURE))
                        .title("my position"));

            }

        };

        map.setOnMyLocationChangeListener(locationListener);
Kapil Parmar
  • 881
  • 8
  • 19