简体   繁体   中英

How to hide the gray/white areas in mapView in android

In the following screenshot you can see a white area (highlighted by red) appearing by default in every mapview. I know that the mapView in android has this default behavior but when the native Google Maps app is launched in the device, it doesnt show the white area. I would like to see that behavior. But i am out of options. Should there be any scroll listener on the map which will stop the panning over white areas. Any help is appreciable.

Thanks,

检查此图像中突出显示的区域

In the following screenshot you can see a white area (highlighted by red) appearing by default in every mapview.

It does not appear "by default in every mapview". This sample application , for example, does not have these areas, at least at reasonable zoom levels.

It is likely that your problem is purely at a zoom level of 1, due to the aspect ratio of the Mercator projection. It has been years since I bothered with a zoom level of 1.

but when the native Google Maps app is launched in the device, it doesnt show the white area

That is because the Google Maps application does not start out at a zoom level of 1. If, however, you pinch-to-zoom to get to its lowest zoom level, then pan around, you will see those white spaces above and below the map. Again, this is most likely due to the aspect ratio of the Mercator projection.

Should there be any scroll listener on the map which will stop the panning over white areas.

I doubt it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM