将大图片加载到Google地图中

时间:2017-08-15 17:13:58

标签: java android google-maps

在我的应用程序中,我需要制作一张大地图。 我使用此代码将地图图像作为地面叠加层加载到Google地图。

Element type is invalid: expected a string (for built-in components) or 
a class/function (for composite components) but got: undefined.  You 
likely forgot to export your component from the file it's defined in.

Check the render method of 'Home'.

但是,在使用地图对片段进行多次输入后,我得到了OOM异常。

git config --local alias.st status

那么,有没有办法将大图像加载到谷歌地图上?

2 个答案:

答案 0 :(得分:1)

请勿加载整个图片 - 请使用TileProviderthis回答中的Alex Vasilkov

答案 1 :(得分:0)

您尝试使用的位图显然非常大。查看Google提供的这个链接,它将解释如何以更有效的方式加载位图: https://developer.android.com/topic/performance/graphics/load-bitmap.html

相关问题