Google map loaded with square patches

I ran into one problem: when the google map loads, I see square patches (as shown in the picture). One thing, I want to make everything clear that this is not due to the low bandwidth as I tested it on a high-speed connection (4MBPS). Also, sometimes when you click on a map, patches disappear (not always). Please help me as soon as possible. Thank you in advance:) enter image description here

+4
source share
2 answers

@Vaibhav, I encounter the same problem in my application once. Add layout code. I think you are mistaken in the attributes Mapview Layout-width and Layout-Height.

Watch it ....

<com.google.android.maps.MapView android:id="@+id/mapView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:enabled="true" android:clickable="true" android:apiKey="xxx" /> 

If you used a parent counter or instead of fill_parent, change this. Hope your error is resolved by this.

0
source

Quoting tdavisjr from a MapView render with missing snippets with an β€œx” in the center :

Ok After starting from a clean project, I found these two lines of code that were the culprits.

 mapView.setSatellite(true); mapView.setStreetView(true); 

They appeared to each other and I looked back at the very beginning of the development, and they were there, and everything went fine. This seems to be a bug in MapView, as I assume it is trying to show both SateliteView and StreetView at the same time. One would think that the latter redefined the former; but i don't think so.

So, the question I have is why all this suddenly surfaced over the past week or so. I assume that the Maps application was the last update on the market on September 8, and perhaps a day or so after the update from the market, this question began to pop up.

As a test, can someone just add these two lines to their code and confirm that you are getting the same behavior?

+1
source

Source: https://habr.com/ru/post/1382453/


All Articles