0

I have the showmappins method, it returns from the server, multiple bookmarks and fixes them on the map. I use the googlemaps API.

Method:

 //show map markers
    private void showMapPins(double lat, double lng, String pin, String address, String hora, String dia) {
        LatLng location = new LatLng(lat, lng);
        MarkerOptions markerOptions = new MarkerOptions();
        markerOptions.position(location);
        .....

        switch (pin) {
            case "1":
                map.addMarker(new MarkerOptions().position(location).title("Some Title").snippet(endereco).icon(BitmapDescriptorFactory.fromResource(R.drawable.somepng)));
                break;
        }

        map.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {

            @Override
            public View getInfoWindow(Marker arg0) {
                return null;
            }

            @Override
            public View getInfoContents(Marker marker) {

                LinearLayout info = new LinearLayout(activity);
                info.setOrientation(LinearLayout.VERTICAL);

                TextView title = new TextView(activity);
                title.setTextColor(Color.BLACK);
                title.setGravity(Gravity.CENTER);
                title.setTypeface(null, Typeface.BOLD);
                title.setText(marker.getTitle());

                TextView snippet = new TextView(activity);
                snippet.setTextColor(Color.GRAY);
                snippet.setText(marker.getSnippet());

                info.addView(title);
                info.addView(snippet);

                return info;
            }
        });
    }

Clicking on the bookmark opens the information about the bookmark and the buttons appear to generate the route on googlemaps. Image:

enter image description here

But my floatbutton is over these buttons. Is it possible to change the position and, if possible, its size?

Thank you.

0 Answers0