5

I'm not sure what exactly is going on, but I'm attempting to render radar tiles over a Google Maps map and am receiving the following messages:

  • ((null)) was false: Unable to create GMSGLImageTile due to bad graphics data
  • ((null)) was false: Don't support little endian bitmaps

Is there an easy way to convert a UIImage to a big endian or is there something I need to know about using / subclassing GMSSyncTileLayer?

The images I'm trying to render as tiles are png images.

Brian Weinreich
  • 7,692
  • 8
  • 35
  • 59

3 Answers3

1

That error will occur if your PNG images for your tiles are not set to 8-bit color depth.

Changing the color depth of your images to 8-bits should fix the problem.

Daniel Zhang
  • 5,778
  • 2
  • 23
  • 28
1

If it's only the big-little endian problem, yes. Did you get the bitmap by NSDate or is it possible to create one? If so, convert it to a bytes array then swap the bits.

*Edited

Me and the other guys have made some answers here: https://stackoverflow.com/a/33051250/1900120

Community
  • 1
  • 1
MatthewLuiHK
  • 691
  • 4
  • 10
  • I tried writing a method that would swap that bits, but the image got really mangled. It was taking a really long time to figure out what was going on, so we ended up using a different implementation that served 8-bit images. Thanks for your help though! – Brian Weinreich Oct 28 '15 at 19:32
  • You are welcome Brian. I'm so curious about your implementation~ Is it a data structure and algo that special designed for converting the underlay bits? Please give me a hint if you don't mind since those info may help so many of us in the future. – MatthewLuiHK Oct 29 '15 at 04:01
1

This reference where reported and answered about your question

https://github.com/domesticmouse/swift-google-map

https://code.google.com/p/gmaps-api-issues/issues/detail?id=8787

Grigori Jlavyan
  • 1,871
  • 3
  • 19
  • 39