java.lang.Object
com.dlsc.gmapsfx.shapes.ArcBuilder
public class ArcBuilder extends Object
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
-
Constructor Summary
Constructors Constructor Description ArcBuilder() -
Method Summary
Modifier and Type Method Description static MVCArraybuildArcPoints(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.static MVCArraybuildArcPoints(LatLong center, LatLong start, LatLong end)static PolygonOptionsbuildClosedArc(LatLong center, LatLong start, LatLong end, javafx.scene.shape.ArcType arcType)Builds the path for a closed arc, returning a PolygonOptions that can be further customised before use.static PolylineOptionsbuildOpenArc(LatLong center, LatLong start, LatLong end)Builds the path for an open arc based on a PolylineOptions.
-
Constructor Details
-
ArcBuilder
public ArcBuilder()
-
-
Method Details
-
buildClosedArc
public static final PolygonOptions buildClosedArc(LatLong center, LatLong start, LatLong end, javafx.scene.shape.ArcType arcType)Builds the path for a closed arc, returning a PolygonOptions that can be further customised before use.- Parameters:
center-start-end-arcType- Pass in either ArcType.CHORD or ArcType.ROUND- Returns:
- PolygonOptions with the paths element populated.
-
buildOpenArc
Builds the path for an open arc based on a PolylineOptions.- Parameters:
center-start-end-- Returns:
- PolylineOptions with the paths element populated.
-
buildArcPoints
-
buildArcPoints
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- The LatLong point of the center.startBearing- North is 0 degrees, East is 90 degrees, etc.endBearing- North is 0 degrees, East is 90 degrees, etc.radius- In metres- 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.
-