Display KML file

This is a test for the shortcode:

[*osm_map_v3 map_center="38.713,-9.136" zoom="16" width="95%" height="300" map_border="thin solid orange" file_list="../../../../wp-content/uploads/osm_map/OSM_02.kml"]
 *...remove the red star

Download this sample kml-file HERE.

You can also display a list of kml-files within one map with an selection box under the map:

[*osm_map_v3 map_center="38.713,-9.136" zoom="16" width="95%" height="450" file_list="../../../../wp-content/uploads/osm_map/OSM_01_red.kml,../../../../wp-content/uploads/osm_map/OSM_01_black.kml" file_color_list="#ff0000,#000000" map_border="thin solid orange" file_title="OSM_01_red.kml,OSM_01_black.kml" file_select_box="one"]
Click title to show track
OSM_01_red.kml
OSM_01_black.kml

Add an clickable area with an whole in your map:

[*osm_map_v3 map_center="41.904,12.4495" zoom="15" width="95%" height="300" map_border="thin solid orange" file_list="../../../../wp-content/uploads/osm_map/OSM_Plugin_KML_Sample_02.kml" type="stamen_toner"]

Note: The KML file has to be located on your blog domain!

 

A sample for an KML file with html content:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
  <name>TEST.kml</name>
    <Style id="pushpin">
      <IconStyle>
        <scale>1</scale>
        <Icon>
          <href>http://www.YourDomain.com/wp-content/plugins/osm/icons/styria_linux.png</href>
        </Icon>
        <hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
      </IconStyle>
    </Style>
    <Placemark>
    <name>TEST</name>
    <description><![CDATA[
      <div style="width:300px; height:200px">
        <img src="http://www.YourDomain.com/wp-content/uploads/YourPhoto.jpg"/>
      </div>
]]></description>
    <styleUrl>#pushpin</styleUrl>
    <Point><coordinates>17.130,49.977,0</coordinates></Point>
  </Placemark>
  <Placemark>
    <name>TEST</name>
    <description><!
      [CDATA[
      <div style="width:300px; height:200px">
      Das ist ein Test für KML files mit dem WP OSM Plugin.<br>
      <img src="http://www.YourDomain.com/wp-content/uploads/YourPhoto.jpg"/>
      </div> 
      ]]>
    </description>
    <styleUrl>#pushpin</styleUrl>
    <Point><coordinates>17.133,49.979,0</coordinates></Point>
  </Placemark>
  </Document>
</kml>

Note: You can set the transparency / opacity of the KML track directly in the KML file as KML color. In the first map on this page black is 60% transparent:

<Style id="blackLine">
<LineStyle>
<color>3c000000</color>
<width>5</width>
</LineStyle>
</Style>
<Style id="redLine">
<LineStyle>
<color>#ff0000ff</color>
<width>5</width>
</LineStyle>
</Style>

By continuing to use the site, you agree to the use of cookies and load data from third parties. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close