-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "Failed to decode tile" when trying to load a raster map #20
Comments
Furthermore, I should state that the example provided in the Advanced Map demo proj, basemap styles vector/raster map (the bottom leftmost) doesn't load! |
The given URL https://maps.xxxx.com/data/satellite/1/1/1.jpg does not respond to me, so not sure what can be wrong with it. Maybe your ssl cert has issues? Bottom left sample is Reverse Geocoding to me, but we have many samples and platforms, a screenshot may give better idea what do you mean here. |
Here is the screenshot of the specific example that isn't working in this repo: This is the same problem we are having in our project - unable to load satellite/http tiles, and getting the same error as written in the original post. The xxxx url I example is an obfuscated on purpose, sorry for not making that clear. Let me know if anything else is missing so we can get to fixing this ASAP. |
The error "Unsupported image format" means that SDK gets something not expected from the given URL. Without real URL sample it is impossible to tell what is wrong with it. The "Voyager raster" basemap URL for Objective-C SAMPLE was not updated, this is fixed now. |
I replaced the url with what you've pushed in the commit, and still facing the same issue:
This is the same issue we're facing in our project. Can you confirm you are able to load the "voyager carto raster" map at all? |
Voyager raster after the fix works fine for me. The URL you try to use with jpg does not work for me also, and gives same error. This does not look ok, we'll check it. I tried with http://www.maptiler.com/ own URL ( |
The only difference in urls is jpg vs png - perhaps that is the issue? As you can see, going directly to the URL does work and loads a tile (https://maps.gk.com/data/satellite/5/18/11.jpg) Also, this url works for Android & Web. Awaiting response from you after checking the issue to see how to proceed. Thanks @jaakla |
The working tilehosting.com url has also jpg and I believe server software and data is also same, from Maptiler cloud. The http is slightly different from browsers and apps/sdk. |
The difference seems to be that globekeeper.com has additional HTTP-level gzip encoding in top of jpg. For example tilehosting.com does not use this, as it is not best idea - it makes extra load to both server and client, and does not reduce jpg encoded images much; it can even increase their size in some cases. So for already compressed images like jpg and also png gzip encoding should not be used. The server behaviour is also not compatible with HTTP, the response should take into account request header Our SDK HTTP client part does not support gzip-encoded raster tile images. Current quick solution is turn off the universial gzip encoding in the server side; in the web server conf or add CDN to your service, these should all have proper compression negotiation with client. We'll update SDK also to be ready for such server responses. For example for vector tiles gzip encoding compresses data a lot, so it is common, suggested and supported configuration. |
@royherma SDK 4.1.4 should automatically un-gzip all raster images, so it is worth a try now. |
When debugging and trying to load a tile of a valid url (we check and it even just displays an image of the tile directly from url), as so:
https://maps.xxxx.com/data/satellite/1/1/1.jpg
However, when loading the tiles in our app we are getting errors and unsuccessfully loading/displaying them in the map view.
Our logic for loading is simple:
The errors we are getting in the console log are a variety of these:
We have confirmed that this logic works for our android and web app, but not for ios - with the same link and everything.
Any ideas on why this is happening?
The text was updated successfully, but these errors were encountered: