Question

How to apply the custom icon for kml/kmz conversion from csv value?

  • 31 January 2023
  • 4 replies
  • 36 views

Hi. I would like to know how to apply a custom icon for kml styler. At this moment, I could convert from Csv file into Kmz file with icon that I can select at KML Styler with condition Statement (like value 1 = C1). However, I would like to change these icon into my custom icon (png files). How Can I set? Please kindly give some advise to me.kml_property_icon_change


4 replies

Userlevel 3
Badge +17

Hello @4dlink​ 

Set the filepaths to the custom icons in the Name column. For example, in place of gme/gx_1_blue, enter the path of your custom icon you want in the KML file (eg. C:/Icons/icon1.png). I hope this information helps.

HI @debbiatsafe​ Thank you for your reply. I will try that, but in that case (local PC directory), actual icon (.png file) may kept in local, so when the transformed kml file is showing in different environment, it might not refer the icon, so there migh be no icon to show. Am I correct? I will try to set your suggested way, and I may set output as kmz, so I hope this will kept icon in the file. Thanks again!

Userlevel 3
Badge +17

HI @debbiatsafe​ Thank you for your reply. I will try that, but in that case (local PC directory), actual icon (.png file) may kept in local, so when the transformed kml file is showing in different environment, it might not refer the icon, so there migh be no icon to show. Am I correct? I will try to set your suggested way, and I may set output as kmz, so I hope this will kept icon in the file. Thanks again!

Hello @4dlink​ 

You're correct on both counts. In a KML file, the icon is referenced usually as a relative location to the KML itself (eg. .\\image\\customIcon.png). If the custom icon file is not transferred along with the KML file to a new environment, the icon will be broken.

Creating a KMZ file will ensure custom resources such as icons are included with the file. I hope this information helps.

Hello @4dlink​ 

You're correct on both counts. In a KML file, the icon is referenced usually as a relative location to the KML itself (eg. .\\image\\customIcon.png). If the custom icon file is not transferred along with the KML file to a new environment, the icon will be broken.

Creating a KMZ file will ensure custom resources such as icons are included with the file. I hope this information helps.

Thanks @debbiatsafe​  I understand. Thank you so much for your information.

Reply