![](/img/trans.png)
[英]Google Maps SDK for iOS - Cluster Manager don't show marker title on marker tap
[英]Google Maps SDK for iOS: don't support little endian bitmaps
我正在嘗試在iOS版Google Maps中實現GMSTileLayer
子類。 我在磁盤上有一堆用於圖塊層中每個圖塊的PNG圖像,它們是使用UIImage(contentsOfFile:)
加載的。 當我嘗試加載圖像時,它們沒有顯示,並且我在日志中收到此消息:
2015-08-22 22:50:10.663 inPin[44718:24904635] ((null)) was false: Don't support little endian bitmaps
2015-08-22 22:50:10.663 inPin[44718:24904635] ((null)) was false: Unable to create GMSGLImageTile due to bad graphics data
我不知道PNG圖像甚至具有字節順序,所以我不知道此消息來自何處。 有人知道為什么會這樣嗎? 我從Google磁貼服務器嘗試了PNG,效果很好。 我的PNG由使用ImageMagick的腳本生成。
好吧,我知道了。 原來我的圖像具有16位色深,將其更改為8位可使錯誤消失。 在ImageMagick中,我只需要添加-depth 8
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.