Skip to content
Advertisement

Using one Google Maps Activity, call a method using three different buttons

I have an android application in which I have 3 buttons and by pressing them I want to call three different Google maps markers, by using the same google maps activity.

CLASS WITH 3 DIFFERENT BUTTONS

JavaScript

and then my GOOGLE MAPS ACTIVITY CODE

JavaScript

This is what I’ve done so far, but I can’t find a way to use the same onMapReady method, to show the three different markers, when I am pressing the three buttons. It’s obvious that I have to pass something using the intent class, but I don’t know what.

Any help is appreciated!!! Thank you.

Advertisement

Answer

I think this can help you

JavaScript
Advertisement