dymaptic / GeoBlazor

Core Components for the Dymaptic GeoBlazor Library
MIT License
108 stars 19 forks source link

JPG graphics are not displayed with PictureMarkerSymbol #316

Closed dirk193 closed 5 months ago

dirk193 commented 7 months ago
        Point point = arg.MapPoint;
        var gGrafiks = new List<Graphic>();
        {
            var gGrafik = new Graphic(point);
            gGrafiks.Add(gGrafik);

//I've tried a lot of JPG graphics. None worked //Unfortunately I don't have access to the graphics. //I solve this by converting the JPG file into a PNG file beforehand and passing it on as Base64. But it's not the right way, I think. var ps = new PictureMarkerSymbol("https://web.imt-atlantique.fr/x-info/atlanmod/images/d/d1/Github.jpg", 15, 15, 0, 0, 0); await gGrafik.SetSymbol(ps); }

TimPurdum commented 7 months ago

@dirk193 when I try to request that image linked above, I get a CORS error in the browser. Is this what you are seeing as well? If I just use a self-hosted jpg, it seems to work fine.

On the ArcGIS docs, https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-PictureMarkerSymbol.html, it mentions this is an issue.

dirk193 commented 7 months ago

Thank you for taking care of this. The jpgs didn't work even when self-hosted. However, I have now updated to 3.0.1. JPGs work now.