makeImageRequest(): any chance to get support for SVG format?

Hello,

makeImageRequest() returns response code 404 for an SVG image.

I guess this means that SVG is not supported (yet).

What I have tried so far:

  1. The image can be downloaded successfully with makeWebRequest(). This means that the URL is correct (just in case...). But, then, there is no way to create a bitmap from the SVG string, so I am stuck.
  2. If I download the SVG file 'manually" and add it to the resources, the application is then able to load it and to display it properly. This means that the format of the SVG file is valid (from the point of view of the SDK).

Could someone confirm if SVG format is supported or not by makeImageRequest()?

Is there any way the application can dynamically download an SVG file and display it?

Thanks

  • Understand that when you do a makeImageRequest, it actually passes through a Garmin server for processing processing to turn it into something that can be used on a Garmin device.  Size, pallet, dithering is all handled there.

    When you add an svg to resources, the image processing is done by the CIQ resource compiler. The svg is not actually in the prg file.

  • Yes, that's my understanding. Seems that the resource compiler supports SVG (since 4.0.0 if I remember well), but GCM does not.

  • I'm checking into this - I was able to reproduce the 404 when requesting an SVG with makeImageRequest(), but I'm not sure whether we should expect that to work. I think it's a reasonable expectation, but I can't find anything documented anywhere that tells me it should work. I suspect the limitation is not in the makeImageRequest API itself, but in the image service Jim mentioned. 

  • Was there ever a resolution to this?

    I have a similar use case: I'm developing a Garmin app that integrates with openHAB, a home automation platform. The openHAB server provides device icons in SVG format and dynamically selects icons based on the state of a device (e.g., a different icon for a light that's on vs. off, or a roller shutter that's open vs. closed).

    Since there are a large number of icons and their appearance depends on real-time device states, embedding them all as static resources in the app isn’t practical. I'd like to access these SVG icons dynamically using makeImageRequest. Has anyone successfully done this, or found a workaround?