Embedded Images in KML no longer supported in mapviewer?

68 views
Skip to first unread message

Michael Dubach

unread,
Sep 2, 2024, 11:52:41 AM9/2/24
to GeoAdminCh API
Hello

We have a route editor which allows us to draw routes on the network with a snap function. We can export the route as a KML file and view it in the mapviewer, which worked perfectly. Since the release of the new mapviewer we have encountered a problem with these KML. When importing them to map.geo.admin.ch we get the error message: "Invalid file, only KML or GPX file are supported". Testing by importing to e.g. Google Earth works fine.

What we found out is that the problem only occurs when you set control points between the start and end points. These points are saved in the file as a placemark with an embedded PNG (encoded in base64) as the icon style. The PNG is just a 1x1 pixel transparent placeholder, but that seems to be the problem.
The placemark for the start and end point has a link to the actual PNG, so there's no problem.

Is it possible to re-enable KML with embedded images, or was this disabled for a reason?

Thanks for your help. Attached is an example of a KML with the embedded image (4843-detour.kml) and one without (4843-way.kml).

Michael
Schweizer Wanderwege



4843-way.kml
4843-detour.kml

Michael Dubach

unread,
Sep 12, 2024, 6:10:59 AM9/12/24
to GeoAdminCh API
Hello

I would like to ask if anyone has seen my message and is already being processed somewhere.
A brief evaluation would be very valuable for us before we start an costly further development on our site.

Many Thanks!

Michael Dubach
Schweizer Wanderwege

GeoAdminCh API

unread,
Sep 12, 2024, 7:09:19 AM9/12/24
to GeoAdminCh API
Hi Michael

Thanks for your messages and sorry for the delayed response.
We received your message and will have a look at it.
We will come back to you, once the issue is fixed.

Best regards
Juergen

GeoAdminCh API

unread,
Sep 12, 2024, 11:38:36 AM9/12/24
to GeoAdminCh API
Hi Michael

Thanks once more for your report, we identified and fixed the problem.
After some testing, the fix will be deployed during the next week in production.
In case you want to test the fix, here's a non-permanent test link: https://sys-map.dev.bgdi.ch/preview/feat-pb-970-kmz-support/index.html

Hope that works for you.
Should you still experience problems by mid of next week, please ping us again.

Best regards
Juergen

Michael Dubach

unread,
Sep 12, 2024, 12:45:26 PM9/12/24
to GeoAdminCh API
Hi Juergen

Thank you very much for the fast solution!
It looks good to me so far, but I will do some more testing next week.

Best regards
Michael

Reply all
Reply to author
Forward
0 new messages