xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.64k stars 1.88k forks source link

XAML Image doesn't show image #15715

Closed gpsaliola closed 1 year ago

gpsaliola commented 1 year ago

Description

I've a XAML Image with Source = "https://tile.openstreetmap.org/12/2191/1521.png". The image it's not show.

Steps to Reproduce

<Image 
    Source="https://tile.openstreetmap.org/12/2191/1521.png"
/>

In the browser the image was shown. Try: https://tile.openstreetmap.org/12/2191/1521.png

Thank you.

jfversluis commented 1 year ago

Thanks for the report! Unfortunately without any additional information this is pretty hard to diagnose. The issue template is there to capture this information: on which platform are you seeing this, what versions? What did you try?

I did try it on Android and I see this in the output:

image

Somehow the loading seems to be blocked and/or "image data was invalid".

Doing a quick search on the usage of the Open Street Map tiles I come here: https://operations.osmfoundation.org/policies/tiles/

Which specifies that you need (or shouldn't do) some HTTP headers. So probably something in that regard is wrong. Unfortunately the built-in Image control doesn't allow much control over the headers being sent, so you'll have to build something custom for that.