@ParametersAreNonnullByDefault public class GLMapTrackData extends GLNativeObject
GLMapTrackData holds data for track| Modifier and Type | Class and Description |
|---|---|
static interface |
GLMapTrackData.PointsCallback
Callback for filling track data
|
| Constructor and Description |
|---|
GLMapTrackData(GLMapTrackData.PointsCallback pointsCallback,
int size)
Constructor with callback
|
GLMapTrackData(java.util.List data)
Constructor from raw data
|
| Modifier and Type | Method and Description |
|---|---|
GLMapTrackData |
copyTrackAndAddGeoPoint(double lat,
double lon,
int color,
boolean startNewSegment)
Copies points to new track and add new point to track.
|
GLMapTrackData |
copyTrackAndAddPoint(double x,
double y,
int color,
boolean startNewSegment)
Copies points to new track and add new point to track.
|
MapPoint |
findNearestPoint(GLMapView mapView,
MapPoint point,
double distanceInPoints)
Calculates nearest point on track from given point
|
GLMapBBox |
getBBox()
Retrurns bbox of track
|
int |
getByteCount()
Size of internal data of GLMapTrackData.
|
static long |
GetNativeCallbacks()
Interface to create and modify track data from jni code.
|
static void |
setPointData(long nativePoint,
int x,
int y,
int color)
Sets data for native point.
|
static void |
setPointDataGeo(long nativePoint,
double lat,
double lon,
int color)
Sets data for native point.
|
disposepublic GLMapTrackData(GLMapTrackData.PointsCallback pointsCallback, int size)
pointsCallback - callback that will provide information about pointssize - number of points in trackpublic GLMapTrackData(java.util.List data)
data - List of byte arrays with raw data. Each element of this array defines track segmentpublic static void setPointData(long nativePoint,
int x,
int y,
int color)
nativePoint - nativePoint passed to callbackx - x coordinate of pointy - y coordinate of pointcolor - color of track at this pointpublic static void setPointDataGeo(long nativePoint,
double lat,
double lon,
int color)
nativePoint - nativePoint passed to callbacklat - latitude of pointlon - longitude of pointcolor - color of track at this pointpublic static long GetNativeCallbacks()
public int getByteCount()
@NonNull public GLMapBBox getBBox()
@NonNull public GLMapTrackData copyTrackAndAddPoint(double x, double y, int color, boolean startNewSegment)
x - x coordinatey - y coordinatecolor - color at pointstartNewSegment - If YES new segment will be created@NonNull public GLMapTrackData copyTrackAndAddGeoPoint(double lat, double lon, int color, boolean startNewSegment)
lat - latitude coordinatelon - longitude coordinatecolor - color at pointstartNewSegment - If YES new segment will be created@Nullable public MapPoint findNearestPoint(GLMapView mapView, MapPoint point, double distanceInPoints)
mapView - MapView where track is displayedpoint - Point from where calculate nearest pointdistanceInPoints - maximum distance from track in pointsCopyright © 2019 GetYourMap. All Rights Reserved.