public class RouteKmlIO
extends java.lang.Object
Route
objects to and from KML Supported KML convention: Top
level Document/Folder name will determine route name First LineString Placemark will determine
points along the route LineStyle/color will determine route color Zero or more Point Placemarks
which touch the route Each will become a route Checkpoint KML name will be used as ATAK label All
other KML data will be ignoredModifier and Type | Class and Description |
---|---|
static class |
RouteKmlIO.CheckpointExportMode
Points: Exports a list of Points for each checkpoint
Line: Exports a LineString containing only checkpoints (not all route vertices)
Both: Exports a LineString containing all route vertices, and a list of Points for each checkpoint
|
Modifier and Type | Field and Description |
---|---|
static double |
CHECKPOINT_TOLERANCE_DISTANCE_METERS
While importing a KML route, use this value to determine if a Point Placemark is a route
checkpoint
|
Constructor and Description |
---|
RouteKmlIO() |
Modifier and Type | Method and Description |
---|---|
static Kml |
read(java.io.File file,
android.content.Context context)
Read KML route from specified file
|
static Folder |
toKml(android.content.Context context,
Route route,
RouteKmlIO.CheckpointExportMode mode,
boolean clampToGround)
Convert route to KML
|
static Route |
toRoute(MapView mapView,
Kml kml,
MapGroup routeGroup,
MapGroup waypointGroup,
android.content.SharedPreferences prefs)
Convert KML to route
|
static void |
write(Kml kml,
java.io.File file)
Write KML route to specified file
|
public static final double CHECKPOINT_TOLERANCE_DISTANCE_METERS
public static Folder toKml(android.content.Context context, Route route, RouteKmlIO.CheckpointExportMode mode, boolean clampToGround)
route
- mode
- clampToGround
- public static void write(Kml kml, java.io.File file) throws java.lang.Exception
kml
- file
- java.lang.Exception
public static Route toRoute(MapView mapView, Kml kml, MapGroup routeGroup, MapGroup waypointGroup, android.content.SharedPreferences prefs)
kml
- public static Kml read(java.io.File file, android.content.Context context)
file
-