6 Replies Latest reply on Aug 22, 2013 7:03 AM by beverly

    kml / kmz with image attachment

    DanielHirner

      I'm curious to know if there is a way to attach images from a container field to an export of records to a kml / kmz file on an iOS device? There are numerous apps out there that do this... Avenza PDF Maps, FieldNotes Pro, GIS Kit, etc. - where the user collects records and images and is able to export and send an email in kmz format with the kmz file containing the images as well. Why does this seem so problematic in Filemaker?

       

      Thanks in advance for any advice you can provide.

       

      Dan

        • 1. Re: kml / kmz with image attachment
          taylorsharpe

          Keyhole Markup Language really is just XML and map graphic and FileMaker plays well with XML if you know what you are doing.  A FileMaker script can attach a single file to an email that has the XML in it.  I have never done what you are talking about, but I don't see why it is hard to do if you know how the XML is supposed to be formatted.  Do you know KML well enough to format the XML yourself?  KMZ files are just the XML text file and map graphic zipped up to send as a single file.  You can write a script and save it as a text file and be good to go.  The challenge is how to zip up the file on an iOS device.  FileMaker can save a file, but cannot do anything else to the file like Zip it up unless you have a plugin and plugins don't work on iOS devices.  And since apps on iOS devices are sandboxed, it is unlikely another app will be able to do the zipping of a file saved by FileMaker.  Maybe someone will have an idea here or maybe this could be solved with FMRPC. 

          • 2. Re: kml / kmz with image attachment
            beverly

            Taylor is correct. In addition, graphics need to be TEXT in XML (of any format), so tend to be base64'd. (Lookup base64). Even graphics in email are base64 if you look at the source code.

             

            -- sent from my iPhone4 --

            Beverly Voth

            --

            • 3. Re: kml / kmz with image attachment
              Mike Duncan

              What Beverly said, base64 is what is typically used when images are inline or attached. I sort of remember converting images at one point with some applescript, but that was on a desktop.

               

              Of course, images in email can also be referenced in html, which don't come as attachments. I think this is also possible in kml, you can reference an image by inserting some html to display. If the images are mirrored on a web server somewhere, this might be possible.

              • 4. Re: kml / kmz with image attachment
                DanielHirner

                Thanks very much.  I have some iOS app that do this.. i.e. bundle images and records into a single KMZ file - so it should be possible.  I need to figure out how to extract the images from the container, reference them in the kml and then the tricky part of compressing that file with images into kmz.

                • 5. Re: kml / kmz with image attachment
                  beverly

                  Yes, Mike mentions the reference an URL method for the image location. This is also commonly done, rather than embedding images/files in code. The images/files need to be accessible from this URL and the "container-field" may not allow this. Whether this method works for KML/KMZ, I don't know.

                  • 6. Re: kml / kmz with image attachment
                    beverly

                    Yes, your apps may do this. FileMaker natively does not.

                     

                    See if the plug-in folks have any solutions for you. Try 360Works, first.

                     

                    Beverly