Adding KML overlays

A KML file contains layers and collections of features that you can add onto an IBM® Intelligent Operations Center map. If you have data in XML format, you can use the KML schema to add features onto a map without requiring a data source. You can add KML overlays to base maps.

Before you begin

Configure a web file server to serve the KML files by following the instructions in Configuring a web file server. The solution supports the following KML functionality:
  • PlaceMarks
  • Lines and Paths
  • Polygons
  • Multi-Geometries
  • Styles
The solution does not support the following KML functionality:
  • Ground Overlays
  • Screen Overlays
  • Network Links

About this task

To add KML overlays to a map, configure the IBM Intelligent Operations Center KmlUrls system property. The order in which the layers are displayed in the Map Overlays pane within the filter depends on the order that they are defined in the KmlUrls system property. To add a KML overlay to a map in the solution, follow the procedure.

Procedure

  1. In the navigation menu, click Administration > System Administration > System Properties.
  2. Edit the KmlUrls system property to display the KML overlays that you require. For example, to configure two overlays simultaneously, modify the system property with the following values:
    [{"label": {"group": "KMLLayer", "key": "layer1"}, 
    "url": "context_root/UpdateKMLFile.kml"}, 
    {"label": {"group": "KMLLayer", "key": "layer2"}, 
    "url": "context_root/KMLSAMPLE.kml"}]
    where:
    • label is the KML overlay label.
    • group and key are the values that are used to look up the label for the layer in the I18N resource service.
      Note: Add the relevant values to the ioc.i18n_resource table.
    • URL is the URL of the KML layer file, where context_root is the value that you specified when you configured the web file server.
  3. Save your changes.

Results

In the Operations view, all of the selectable KML layers are displayed in the Map Overlays pane in the Filter window.

What to do next

If your KML functionality is supported, and the KML layer does not display on the map, validate your KML to ensure that there are no errors in the KML file. Supported KML resembles the following examples:
<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns=" http://www.opengis.net/kml/2.2 "> 
  <Document> 
    <name>Round Rock Sample</name> 
    <Style id="polygon"> 
      <LineStyle> 
        <color>50F04614</color> 
        <width>4</width> 
      </LineStyle> 
    </Style> 
    <Placemark> 
      <name>Round Rock Sample Polygon</name> 
      <visibility>1</visibility> 
      <styleUrl>#polygon</styleUrl> 
      <MultiGeometry> 
       <Polygon> 
        <outerBoundaryIs> 
          <LinearRing> 
            <coordinates> 
              -97.6866313, 30.5165826, 0 
              -97.6827689, 30.5036419, 0 
              -97.6549598, 30.5118503, 0 
              -97.6561614, 30.5153996, 0 
              -97.6556464, 30.5174699, 0 
              -97.6599380, 30.5168785, 0 
              -97.6770183, 30.5186529, 0 
              -97.6866313, 30.5165826, 0 
            </coordinates> 
          </LinearRing> 
        </outerBoundaryIs> 
      </Polygon> 
      <Polygon> 
        <outerBoundaryIs> 
          <LinearRing> 
            <coordinates> 
             -97.6772756, 30.4927705, 0 
             -97.6772756, 30.4927705, 0 
             -97.6731558, 30.4812321, 0 
             -97.6395960, 30.4886287, 0 
             -97.6422567, 30.4960247, 0 
             -97.6605387, 30.4960986, 0 
             -97.6674051, 30.4957288, 0 
             -97.6772756, 30.4927705, 0 
            </coordinates> 
          </LinearRing> 
        </outerBoundaryIs> 
      </Polygon> 
     <MultiGeometry> 
   </Placemark> 
  </Document> 
</kml>

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Placemark>
    <name>Round Rock Sample Stadium</name>
    <description>
     Round Rock Sample
    </description>
    <Point>
      <coordinates>-97.695392, 30.507252,0</coordinates>
    </Point>
  </Placemark>
</kml>