Skip to main content

I worked with one of our interns on developing a pretty simple workbench that queries records from a REST service using a project #, styling the popups and icons, and writes it out to a KML that is then downloaded from FME server using the data download service. I have exposed the attachment from ArcGIS Online and have the process worked out for converting them to base64.

 

The next part that I'm needing help with (why I posted this) is determine the best way to embed the photos in the popup, which are varying content subtypes of image (image/png, image/jpeg, image/jpg, etc). I've attempted (unsuccessfully) to embed the base64 image in html, but it doesn't seem to load. I think the best way would be to save the images in a folder, and somehow reference the local image path in the kml popup... Both the KML and Images would be downloaded through the published data download service.

I think you are on the right track with embedding the image in the kml. I have done this before, I'll see if I can find the workspace for you.


I think you are on the right track with embedding the image in the kml. I have done this before, I'll see if I can find the workspace for you.

Turns out it was one of our clients that has done this before. I have their workspace and have asked if I can share it but I'll at least be able to figure out where you are failing.


Hi @runneals​ 

I would recommend taking a look at the second example of this Embedding Images in HTML with FME article if you wish to embed base64 encoded images in KML. The article and the accompanying workspaces were made 2013(!) but the workspace still works in 2021. I hope this helps!


Hi @runneals​ 

I would recommend taking a look at the second example of this Embedding Images in HTML with FME article if you wish to embed base64 encoded images in KML. The article and the accompanying workspaces were made 2013(!) but the workspace still works in 2021. I hope this helps!

kmlHere's the workflow that I used... Useful for when working with ArcGIS Online, ArcGIS Portal, or ArcGIS Server REST services with attached attachments. I forgot I had done this previously but for emails. You may need to initially click on the images and login to AGOL/Portal/Server when using this method, but it works pretty well, you don't have to worry about images and this is the easiest way to deal with security. There is a private parameter that I set (ServiceURL) that points to the service, to allow ultimate flexibility. In the attached screenshot, the /0/ refers to the layer # that can be found within the REST service.


Reply