I am making an app that uses maps api, and I want to create a custom popup activity when the user creates a marker (not the generic yes/no dialogue). What I want to do is:
- when a user longclicks on map it opens a new activity instead of dialogue
- this activity displays lat and lang, has a field to enter text, and yes/no buttons
- if a user clicks yes the marker is pinned if no it is not
- when a user clicks on the created marker it displays lat,lng and the entered text
My current code:
//Add marker on long click
mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {
@Override
public void onMapLongClick(LatLng arg0) {
Intent intent = new Intent(getActivity(), CreateRestautantActivity.class);
startActivity(intent);
marker = mMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.custom_marker))
.position(
new LatLng(arg0.latitude,
arg0.longitude))
.visible(true));
}
});
Any help is appreciated :)