Integrated the map into the android application and now I think how to perform my actions only when the user clicked on the building (above 5 floors). Is it even possible? Google, Google, I do not find anything.

    1 answer 1

    Is it even possible?

    Why not? Here is an excerpt from the documentation :

    If you need to respond to a user clicking on a point on the map, use OnMapClickListener, which can be set for the map by calling GoogleMap.setOnMapClickListener (OnMapClickListener). When a user clicks a point on the map, you will receive an onMapClick (LatLng) event indicating the user’s click location. Note that if you need the coordinates of the corresponding point on the screen in pixels, you can get Projection from the map, which will allow you to convert between latitude / longitude coordinates and screen pixels.

    In order to handle the press specifically on the building, you can try to do this as follows. Maybe this is not the best option, but here's how I see it:

    when you click on any point on the map, you will receive an onMapClick(LatLng ) event. And then during its processing, check whether the building is in focus by calling the GoogleMap.getFocusedBuilding() method:

    To get the building that is currently in focus, call GoogleMap.getFocusedBuilding ()

    • !!!! Wow !!! Thank you - Flippy