android - Calling acitivity from "OnMapClickListener()" not working -
i have tried lot of examples none of them worked.
mmap.setonmapclicklistener(new googlemap.onmapclicklistener() { @override public void onmapclick(latlng latlng) { markeroptions markeroptions = new markeroptions(); markeroptions.position(latlng); markeroptions.title(latlng.latitude + " : " + latlng.longitude); mmap.clear(); mmap.animatecamera(cameraupdatefactory.newlatlng(latlng)); mmap.addmarker(markeroptions); intent in = new intent(getapplicationcontext(),mainmenu.class); startactivity(in); } });
marker added map unfortunately shows error. when click ok goes next activity.
Comments
Post a Comment