1

Can we add Actions inside Marker Snippet like Delete marker button, navigate button etc., We can remove marker by clicking the marker. But, I don't want that because i want to show snippet when i click the marker. so, Definetly i need to actions to snippet or infoWindow. I'm surprised that i didn't find any useful solution to me. Here is the code how to remove the marker when onClick marker

Marker locationMarker = mMap.addMarker(
                new MarkerOptions()
                        .position(latLng)
                        .title(userName)
                        .snippet(getLocation(latLng)));
        mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 14.0f));
        mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
                        @Override
                        public boolean onMarkerClick(Marker marker) {
                            marker.remove();
                            return true;
                        }
                    });

If any guide me how can i do that.

0 Answers0