Top Description Fields Constructors Methods
com.dlsc.gmapsfx.shapes

public Class ArcBuilder

extends Object
Class Inheritance
Imports
com.dlsc.gmapsfx.javascript.object.LatLong, .MVCArray, javafx.scene.shape.ArcType

Builds a Polygon or Polyline in the shape of an Arc. Based on the logic in v3_polygon_exanple_arc.html from http://econym.org.uk/gmap/ which is based in turn on the Latitude/longitude spherical geodesy formulae and scripts at http://www.movable-type.co.uk/scripts/latlong.html (c) Chris Veness 2002-2010
Author
Geoff Capper

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final MVCArray
buildArcPoints(LatLong center, LatLong start, LatLong end)

public static final MVCArray

Returns:

An array of LatLong points in an MVC array representing the arc. Using this method directly you will need to push the centre point onto the array in order to close it, if desired.
buildArcPoints
(LatLong
The LatLong point of the center.
center
,
double
North is 0 degrees, East is 90 degrees, etc.
startBearing
,
double
North is 0 degrees, East is 90 degrees, etc.
endBearing
,
double
In metres
radius
)

Generates the points for an arc based on two bearings from a centre point and a radius.

public static final PolygonOptions

Returns:

PolygonOptions with the paths element populated.
buildClosedArc
(LatLong center, LatLong start, LatLong end, ArcType
Pass in either ArcType.CHORD or ArcType.ROUND
arcType
)

Builds the path for a closed arc, returning a PolygonOptions that can be further customised before use.

public static final PolylineOptions

Returns:

PolylineOptions with the paths element populated.
buildOpenArc
(LatLong center, LatLong start, LatLong end)

Builds the path for an open arc based on a PolylineOptions.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_ARC_POINTSback to summary
private static final int DEFAULT_ARC_POINTS

Constructor Detail

ArcBuilderback to summary
public ArcBuilder()

Method Detail

buildArcPointsback to summary
public static final MVCArray buildArcPoints(LatLong center, LatLong start, LatLong end)
buildArcPointsback to summary
public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius)

Generates the points for an arc based on two bearings from a centre point and a radius.

Parameters
center:LatLong

The LatLong point of the center.

startBearing:double

North is 0 degrees, East is 90 degrees, etc.

endBearing:double

North is 0 degrees, East is 90 degrees, etc.

radius:double

In metres

Returns:MVCArray

An array of LatLong points in an MVC array representing the arc. Using this method directly you will need to push the centre point onto the array in order to close it, if desired.

buildClosedArcback to summary
public static final PolygonOptions buildClosedArc(LatLong center, LatLong start, LatLong end, ArcType arcType)

Builds the path for a closed arc, returning a PolygonOptions that can be further customised before use.

Parameters
arcType:ArcType

Pass in either ArcType.CHORD or ArcType.ROUND

Returns:PolygonOptions

PolygonOptions with the paths element populated.

buildOpenArcback to summary
public static final PolylineOptions buildOpenArc(LatLong center, LatLong start, LatLong end)

Builds the path for an open arc based on a PolylineOptions.

Returns:PolylineOptions

PolylineOptions with the paths element populated.