• Resolved mygrove

    (@mygrove)


    My KML file has a set of markers in this format

       <Placemark>
          <name>Kingsthorpe</name>
    <styleUrl>#a</styleUrl>      <Point>
             <coordinates>-0.9009, 52.2634,0</coordinates>
          </Point>
          <description><![CDATA[Methodist, from: 1979 until: Open]]></description>
       </Placemark>

    In the pop-up for each marker I want to be able to display two of the properties.

    Now I can just display one property like this:

    [leaflet-kml src="https://edintone.com/wp-content/uploads/2024/03/mydata.kml" popup_property="name"]

    but is there a syntax for two properties, like this, and yes, it is the property with the CDATA? i.e. a format that actually works?

    [leaflet-kml src="https://edintone.com/wp-content/uploads/2024/03/mydata.kml" popup_property="name","description"]
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor hupe13

    (@hupe13)

    [leaflet-kml src="https://edintone.com/wp-content/uploads/2024/03/mydata.kml"]Name={name},description={description}[/leaflet-kml]

    See Bozdoz documentation for geojson, it is valid for kml too.

    • This reply was modified 8 months ago by hupe13.
    Thread Starter mygrove

    (@mygrove)

    Thank you, better than I hoped, as I can tweak the HTML too!

    <strong>{name}</strong><br>{description}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display two properties from a KML’ is closed to new replies.