com.partnersoft.formats.kml
Class KmlLib

java.lang.Object
  extended by com.partnersoft.formats.kml.KmlLib

public class KmlLib
extends java.lang.Object

Collection of static methods for generating KmlObjects from various sources.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Rich Stepanski

Constructor Summary
KmlLib()
           
 
Method Summary
static KmlPlacemark createPlacemark(Projection projection, MapDataItem item)
          Creates a placemark based on the passed MapDataItem.
static KmlPlacemark createPlacemark(Projection projection, MapDataItem item, java.lang.String styleUrl)
          Creates a placemark based on the passed MapDataItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KmlLib

public KmlLib()
Method Detail

createPlacemark

public static KmlPlacemark createPlacemark(Projection projection,
                                           MapDataItem item)
Creates a placemark based on the passed MapDataItem. The placemark's name is set to the MapDataItem's quickDescription(), and the geometry is set based on the MapDataItem's type. (line vs text or point).

Note, there are still more fields to be set in the returned Placemark. The fields that are set are just the generic fields to have it be displayed.

Parameters:
projection - - Projection to use to reverseFeet() on the map item's location.
item - - the MapDataItem to turn into a KmlPlacemark.
Returns:
KmlPlacemark representing the passed MapDataItem.

createPlacemark

public static KmlPlacemark createPlacemark(Projection projection,
                                           MapDataItem item,
                                           java.lang.String styleUrl)
Creates a placemark based on the passed MapDataItem. The placemark's name is set to the MapDataItem's quickDescription(), styleUrl is set to the passed styleUrl, unless it is null, and the geometry is set based on the MapDataItem's type. (line vs text or point).

Note, there are still more fields to be set in the returned Placemark. The fields that are set are just the generic fields to have it be displayed.

Parameters:
projection - - Projection to use to reverseFeet() on the map item's location.
item - - the MapDataItem to turn into a KmlPlacemark.
styleUrl - - The styleUrl to set for this placemark.
Returns:
KmlPlacemark representing the passed MapDataItem.