Package mil.nga.geopackage.map.geom
Class GoogleMapShapeConverter
- java.lang.Object
-
- mil.nga.geopackage.map.geom.GoogleMapShapeConverter
-
public class GoogleMapShapeConverter extends Object
Provides conversions methods between geometry object and Google Maps Android API v2 Shapes
-
-
Constructor Summary
Constructors Constructor Description GoogleMapShapeConverter()ConstructorGoogleMapShapeConverter(Projection projection)Constructor with specified projection, seeUserCoreDao.getProjection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultiMarkeraddLatLngsToMap(GoogleMap map, MultiLatLng latLngs)Add a list of LatLngs to the mapstatic MarkeraddLatLngToMap(GoogleMap map, LatLng latLng)Add a LatLng to the mapstatic MarkeraddLatLngToMap(GoogleMap map, LatLng latLng, MarkerOptions options)Add a LatLng to the mapstatic MarkeraddMarkerOptionsToMap(GoogleMap map, MarkerOptions options)Add MarkerOptions to the mapMultiPolygonMarkersaddMultiPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)Add a MultiPolygonOptions to the map as markersMultiPolylineMarkersaddMultiPolylineToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)Add a MultiPolylineOptions to the map as markersList<Marker>addPointsToMapAsMarkers(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds)Add the list of points as markersstatic MultiPolygonaddPolygonsToMap(GoogleMap map, MultiPolygonOptions polygons)Add a list of Polygons to the mapstatic PolygonaddPolygonToMap(GoogleMap map, PolygonOptions polygon)Add a Polygon to the mapPolygonMarkersaddPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)Add a Polygon to the map as markersstatic MultiPolylineaddPolylinesToMap(GoogleMap map, MultiPolylineOptions polylines)Add a list of Polylines to the mapstatic PolylineaddPolylineToMap(GoogleMap map, PolylineOptions polyline)Add a Polyline to the mapPolylineMarkersaddPolylineToMapAsMarkers(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)Add a Polyline to the map as markersstatic GoogleMapShapeaddShapeToMap(GoogleMap map, GoogleMapShape shape)Add a shape to the mapGoogleMapShapeMarkersaddShapeToMapAsMarkers(GoogleMap map, GoogleMapShape shape, MarkerOptions markerOptions, MarkerOptions polylineMarkerOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolylineOptions globalPolylineOptions, PolygonOptions globalPolygonOptions)Add a shape to the map as markersGoogleMapShapeaddToMap(GoogleMap map, Geometry geometry)Convert aGeometryto a Map shape and add itList<GoogleMapShape>addToMap(GoogleMap map, GeometryCollection<Geometry> geometryCollection)Convert aGeometryCollectionto a list of Map shapes and add to the mapBoundingBoxboundingBoxFromWebMercator(BoundingBox boundingBox)Transform the bounding box in web mercator to the feature projectionBoundingBoxboundingBoxFromWgs84(BoundingBox boundingBox)Transform the bounding box in WGS84 to the feature projectionBoundingBoxboundingBoxToWebMercator(BoundingBox boundingBox)Transform the bounding box in the feature projection to web mercatorBoundingBoxboundingBoxToWgs84(BoundingBox boundingBox)Transform the bounding box in the feature projection to WGS84voidclosePolygonRing(List<LatLng> points)Close the polygon ring (exterior or hole) points if neededMultiPolygoncreateMultiPolygon(List<Polygon> polygonList)Convert a list ofPolygonto aMultiPolygonMultiPolygoncreateMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)Convert a list ofPolygonto aMultiPolygonPolygonOrientationgetExteriorOrientation()Get exterior orientation for conversions.PolygonOrientationgetHoleOrientation()Get polygon hole orientation for conversions.PolygonOrientationgetOrientation(List<LatLng> points)Determine the closed points orientationList<LatLng>getPointsFromMarkers(List<Marker> markers)Get a list of points as LatLng from a list of MarkersProjectiongetProjection()Get the projectionDoublegetSimplifyTolerance()Get the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer pointsvoidpopulateLineString(LineString lineString, List<LatLng> latLngs)Convert a list ofLatLngto aLineStringvoidsetExteriorOrientation(PolygonOrientation exteriorOrientation)Set the exterior orientation for conversions, set to null to maintain orientationvoidsetHoleOrientation(PolygonOrientation holeOrientation)Set the polygon hole orientation for conversions, set to null to maintain orientationvoidsetSimplifyTolerance(Double simplifyTolerance)Set the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer pointsCircularStringtoCircularString(List<LatLng> latLngs)Convert a list ofLatLngto aCircularStringCircularStringtoCircularString(List<LatLng> latLngs, boolean hasZ, boolean hasM)Convert a list ofLatLngto aCircularStringCompoundCurvetoCompoundCurve(List<Polyline> polylineList)Convert a list ofPolylineto aCompoundCurveCompoundCurvetoCompoundCurve(List<Polyline> polylineList, boolean hasZ, boolean hasM)Convert a list ofPolylineto aCompoundCurveCompoundCurvetoCompoundCurveFromList(List<List<LatLng>> polylineList)Convert a list of LatLng lists to aCompoundCurveCompoundCurvetoCompoundCurveFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)Convert a list of LatLng lists to aCompoundCurveCompoundCurvetoCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions)Convert aMultiPolylineOptionsto aCompoundCurveCompoundCurvetoCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)Convert aMultiPolylineOptionsto aCompoundCurveCompoundCurvetoCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions)Convert aMultiPolylineOptionsto aCompoundCurveCompoundCurvetoCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)Convert aMultiPolylineOptionsto aCompoundCurvePolygonOptionstoCurvePolygon(CurvePolygon<Curve> curvePolygon)Convert aCurvePolygonto aPolygonOptionsGeometrytoGeometry(GoogleMapShape shape)Convert a GoogleMapShape to a GeometryLatLngtoLatLng(Point point)MultiLatLngtoLatLngs(MultiPoint multiPoint)Convert aMultiPointto aMultiLatLngLineStringtoLineString(Polyline polyline)Convert aPolylineto aLineStringLineStringtoLineString(PolylineOptions polyline)Convert aPolylineOptionsto aLineStringLineStringtoLineString(PolylineOptions polyline, boolean hasZ, boolean hasM)Convert aPolylineOptionsto aLineStringLineStringtoLineString(Polyline polyline, boolean hasZ, boolean hasM)Convert aPolylineto aLineStringLineStringtoLineString(List<LatLng> latLngs)Convert a list ofLatLngto aLineStringLineStringtoLineString(List<LatLng> latLngs, boolean hasZ, boolean hasM)Convert a list ofLatLngto aLineStringMultiLineStringtoMultiLineString(List<Polyline> polylineList)Convert a list ofPolylineto aMultiLineStringMultiLineStringtoMultiLineString(List<Polyline> polylineList, boolean hasZ, boolean hasM)Convert a list ofPolylineto aMultiLineStringMultiLineStringtoMultiLineStringFromList(List<List<LatLng>> polylineList)Convert a list of LatLng lists to aMultiLineStringMultiLineStringtoMultiLineStringFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)Convert a list of LatLng lists to aMultiLineStringMultiLineStringtoMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions)Convert aMultiPolylineOptionsto aMultiLineStringMultiLineStringtoMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)Convert aMultiPolylineOptionsto aMultiLineStringMultiPointtoMultiPoint(List<LatLng> latLngs)Convert aMultiLatLngto aMultiPointMultiPointtoMultiPoint(List<LatLng> latLngs, boolean hasZ, boolean hasM)Convert aMultiLatLngto aMultiPointMultiPointtoMultiPoint(MultiLatLng latLngs)Convert aMultiLatLngto aMultiPointMultiPointtoMultiPoint(MultiLatLng latLngs, boolean hasZ, boolean hasM)Convert aMultiLatLngto aMultiPointMultiPolygontoMultiPolygon(List<Polygon> polygonList)Convert a list ofPolygonto aMultiPolygonMultiPolygontoMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)Convert a list ofPolygonto aMultiPolygonMultiPolygontoMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions)Convert aMultiPolygonOptionsto aMultiPolygonMultiPolygontoMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)Convert a list ofPolygonOptionsto aMultiPolygonPointtoPoint(LatLng latLng)PointtoPoint(LatLng latLng, boolean hasZ, boolean hasM)PolygontoPolygon(Polygon polygon)PolygontoPolygon(PolygonOptions polygon)PolygontoPolygon(PolygonOptions polygon, boolean hasZ, boolean hasM)PolygontoPolygon(Polygon polygon, boolean hasZ, boolean hasM)PolygontoPolygon(List<LatLng> latLngs, List<List<LatLng>> holes)PolygontoPolygon(List<LatLng> latLngs, List<List<LatLng>> holes, boolean hasZ, boolean hasM)PolygonOptionstoPolygon(Polygon polygon)Convert aPolygonto aPolygonOptionsMultiPolygonOptionstoPolygons(MultiPolygon multiPolygon)Convert aMultiPolygonto aMultiPolygonOptionsMultiPolygonOptionstoPolygons(PolyhedralSurface polyhedralSurface)Convert aPolyhedralSurfaceto aMultiPolygonOptionsPolyhedralSurfacetoPolyhedralSurface(List<Polygon> polygonList)Convert a list ofPolygonto aPolyhedralSurfacePolyhedralSurfacetoPolyhedralSurface(List<Polygon> polygonList, boolean hasZ, boolean hasM)Convert a list ofPolygonto aPolyhedralSurfacePolyhedralSurfacetoPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions)Convert aMultiPolygonOptionsto aPolyhedralSurfacePolyhedralSurfacetoPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)Convert aMultiPolygonOptionsto aPolyhedralSurfacePolylineOptionstoPolyline(LineString lineString)Convert aLineStringto aPolylineOptionsMultiPolylineOptionstoPolylines(CompoundCurve compoundCurve)Convert aCompoundCurveto aMultiPolylineOptionsMultiPolylineOptionstoPolylines(MultiLineString multiLineString)Convert aMultiLineStringto aMultiPolylineOptionsPointtoProjection(Point point)Transform a WGS84 point to the projectionGoogleMapShapetoShape(Geometry geometry)Convert aGeometryto a Map shapeList<GoogleMapShape>toShapes(GeometryCollection<Geometry> geometryCollection)Convert aGeometryCollectionto a list of Map shapesPointtoWgs84(Point point)Transform a projection point to WGS84
-
-
-
Constructor Detail
-
GoogleMapShapeConverter
public GoogleMapShapeConverter()
Constructor- Since:
- 1.3.2
-
GoogleMapShapeConverter
public GoogleMapShapeConverter(Projection projection)
Constructor with specified projection, seeUserCoreDao.getProjection()- Parameters:
projection- projection
-
-
Method Detail
-
getProjection
public Projection getProjection()
Get the projection- Returns:
- projection
-
getExteriorOrientation
public PolygonOrientation getExteriorOrientation()
Get exterior orientation for conversions. Defaults to PolygonOrientation.COUNTERCLOCKWISE- Returns:
- exterior orientation
- Since:
- 1.3.2
-
setExteriorOrientation
public void setExteriorOrientation(PolygonOrientation exteriorOrientation)
Set the exterior orientation for conversions, set to null to maintain orientation- Parameters:
exteriorOrientation- orientation- Since:
- 1.3.2
-
getHoleOrientation
public PolygonOrientation getHoleOrientation()
Get polygon hole orientation for conversions. Defaults to PolygonOrientation.CLOCKWISE- Returns:
- hole orientation
- Since:
- 1.3.2
-
setHoleOrientation
public void setHoleOrientation(PolygonOrientation holeOrientation)
Set the polygon hole orientation for conversions, set to null to maintain orientation- Parameters:
holeOrientation- orientation- Since:
- 1.3.2
-
getSimplifyTolerance
public Double getSimplifyTolerance()
Get the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer points- Returns:
- simplify tolerance in meters, null for no simplification
-
setSimplifyTolerance
public void setSimplifyTolerance(Double simplifyTolerance)
Set the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer points- Parameters:
simplifyTolerance- simplify tolerance in meters, null for no simplification
-
toWgs84
public Point toWgs84(Point point)
Transform a projection point to WGS84- Parameters:
point- projection point- Returns:
- WGS84 point
-
toProjection
public Point toProjection(Point point)
Transform a WGS84 point to the projection- Parameters:
point- WGS84 point- Returns:
- projection point
-
toPoint
public Point toPoint(LatLng latLng, boolean hasZ, boolean hasM)
- Parameters:
latLng- lat lnghasZ- has z flaghasM- has m flag- Returns:
- point
-
toPolyline
public PolylineOptions toPolyline(LineString lineString)
Convert aLineStringto aPolylineOptions- Parameters:
lineString- line string- Returns:
- polyline options
-
toLineString
public LineString toLineString(Polyline polyline)
Convert aPolylineto aLineString- Parameters:
polyline- polyline- Returns:
- line string
-
toLineString
public LineString toLineString(Polyline polyline, boolean hasZ, boolean hasM)
Convert aPolylineto aLineString- Parameters:
polyline- polylinehasZ- has z flaghasM- has m flag- Returns:
- line string
-
toLineString
public LineString toLineString(PolylineOptions polyline)
Convert aPolylineOptionsto aLineString- Parameters:
polyline- polyline options- Returns:
- line string
-
toLineString
public LineString toLineString(PolylineOptions polyline, boolean hasZ, boolean hasM)
Convert aPolylineOptionsto aLineString- Parameters:
polyline- polyline optionshasZ- has z flaghasM- has m flag- Returns:
- line string
-
toLineString
public LineString toLineString(List<LatLng> latLngs)
Convert a list ofLatLngto aLineString- Parameters:
latLngs- lat lngs- Returns:
- line string
-
toLineString
public LineString toLineString(List<LatLng> latLngs, boolean hasZ, boolean hasM)
Convert a list ofLatLngto aLineString- Parameters:
latLngs- lat lngshasZ- has z flaghasM- has m flag- Returns:
- line string
-
toCircularString
public CircularString toCircularString(List<LatLng> latLngs)
Convert a list ofLatLngto aCircularString- Parameters:
latLngs- lat lngs- Returns:
- circular string
-
toCircularString
public CircularString toCircularString(List<LatLng> latLngs, boolean hasZ, boolean hasM)
Convert a list ofLatLngto aCircularString- Parameters:
latLngs- lat lngshasZ- has z flaghasM- has m flag- Returns:
- circular string
-
populateLineString
public void populateLineString(LineString lineString, List<LatLng> latLngs)
Convert a list ofLatLngto aLineString- Parameters:
lineString- line stringlatLngs- lat lngs
-
toPolygon
public PolygonOptions toPolygon(Polygon polygon)
Convert aPolygonto aPolygonOptions- Parameters:
polygon- polygon- Returns:
- polygon options
-
toCurvePolygon
public PolygonOptions toCurvePolygon(CurvePolygon<Curve> curvePolygon)
Convert aCurvePolygonto aPolygonOptions- Parameters:
curvePolygon- curve polygon- Returns:
- polygon options
- Since:
- 1.4.1
-
toPolygon
public Polygon toPolygon(Polygon polygon, boolean hasZ, boolean hasM)
- Parameters:
polygon- polygonhasZ- has z flaghasM- has m flag- Returns:
- polygon
-
toPolygon
public Polygon toPolygon(PolygonOptions polygon)
- Parameters:
polygon- polygon options- Returns:
- polygon
-
toPolygon
public Polygon toPolygon(PolygonOptions polygon, boolean hasZ, boolean hasM)
- Parameters:
polygon- polygon optionshasZ- has z flaghasM- has m flag- Returns:
- polygon
-
toPolygon
public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes)
- Parameters:
latLngs- lat lngsholes- list of holes- Returns:
- polygon
-
toPolygon
public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes, boolean hasZ, boolean hasM)
- Parameters:
latLngs- lat lngsholes- list of holeshasZ- has z flaghasM- has m flag- Returns:
- polygon
-
closePolygonRing
public void closePolygonRing(List<LatLng> points)
Close the polygon ring (exterior or hole) points if needed- Parameters:
points- ring points- Since:
- 1.3.2
-
getOrientation
public PolygonOrientation getOrientation(List<LatLng> points)
Determine the closed points orientation- Parameters:
points- closed points- Returns:
- orientation
- Since:
- 1.3.2
-
toLatLngs
public MultiLatLng toLatLngs(MultiPoint multiPoint)
Convert aMultiPointto aMultiLatLng- Parameters:
multiPoint- multi point- Returns:
- multi lat lng
-
toMultiPoint
public MultiPoint toMultiPoint(MultiLatLng latLngs)
Convert aMultiLatLngto aMultiPoint- Parameters:
latLngs- lat lngs- Returns:
- multi point
-
toMultiPoint
public MultiPoint toMultiPoint(MultiLatLng latLngs, boolean hasZ, boolean hasM)
Convert aMultiLatLngto aMultiPoint- Parameters:
latLngs- lat lngshasZ- has z flaghasM- has m flag- Returns:
- multi point
-
toMultiPoint
public MultiPoint toMultiPoint(List<LatLng> latLngs)
Convert aMultiLatLngto aMultiPoint- Parameters:
latLngs- lat lngs- Returns:
- multi point
-
toMultiPoint
public MultiPoint toMultiPoint(List<LatLng> latLngs, boolean hasZ, boolean hasM)
Convert aMultiLatLngto aMultiPoint- Parameters:
latLngs- lat lngshasZ- has z flaghasM- has m flag- Returns:
- multi point
-
toPolylines
public MultiPolylineOptions toPolylines(MultiLineString multiLineString)
Convert aMultiLineStringto aMultiPolylineOptions- Parameters:
multiLineString- multi line string- Returns:
- multi polyline options
-
toMultiLineString
public MultiLineString toMultiLineString(List<Polyline> polylineList)
Convert a list ofPolylineto aMultiLineString- Parameters:
polylineList- polyline list- Returns:
- multi line string
-
toMultiLineString
public MultiLineString toMultiLineString(List<Polyline> polylineList, boolean hasZ, boolean hasM)
Convert a list ofPolylineto aMultiLineString- Parameters:
polylineList- polyline listhasZ- has z flaghasM- has m flag- Returns:
- multi line string
-
toMultiLineStringFromList
public MultiLineString toMultiLineStringFromList(List<List<LatLng>> polylineList)
Convert a list of LatLng lists to aMultiLineString- Parameters:
polylineList- polyline list- Returns:
- multi line string
-
toMultiLineStringFromList
public MultiLineString toMultiLineStringFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)
Convert a list of LatLng lists to aMultiLineString- Parameters:
polylineList- polyline listhasZ- has z flaghasM- has m flag- Returns:
- multi line string
-
toCompoundCurveFromList
public CompoundCurve toCompoundCurveFromList(List<List<LatLng>> polylineList)
Convert a list of LatLng lists to aCompoundCurve- Parameters:
polylineList- polyline list- Returns:
- compound curve
-
toCompoundCurveFromList
public CompoundCurve toCompoundCurveFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)
Convert a list of LatLng lists to aCompoundCurve- Parameters:
polylineList- polyline listhasZ- has z flaghasM- has m flag- Returns:
- compound curve
-
toMultiLineStringFromOptions
public MultiLineString toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions)
Convert aMultiPolylineOptionsto aMultiLineString- Parameters:
multiPolylineOptions- multi polyline options- Returns:
- multi line string
-
toMultiLineStringFromOptions
public MultiLineString toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
Convert aMultiPolylineOptionsto aMultiLineString- Parameters:
multiPolylineOptions- multi polyline optionshasZ- has z flaghasM- has m flag- Returns:
- multi line string
-
toCompoundCurveFromOptions
public CompoundCurve toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions)
Convert aMultiPolylineOptionsto aCompoundCurve- Parameters:
multiPolylineOptions- multi polyline options- Returns:
- compound curve
-
toCompoundCurveFromOptions
public CompoundCurve toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
Convert aMultiPolylineOptionsto aCompoundCurve- Parameters:
multiPolylineOptions- multi polyline optionshasZ- has z flaghasM- has m flag- Returns:
- compound curve
-
toPolygons
public MultiPolygonOptions toPolygons(MultiPolygon multiPolygon)
Convert aMultiPolygonto aMultiPolygonOptions- Parameters:
multiPolygon- multi polygon- Returns:
- multi polygon options
-
toMultiPolygon
public MultiPolygon toMultiPolygon(List<Polygon> polygonList)
Convert a list ofPolygonto aMultiPolygon- Parameters:
polygonList- polygon list- Returns:
- multi polygon
-
toMultiPolygon
public MultiPolygon toMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Convert a list ofPolygonto aMultiPolygon- Parameters:
polygonList- polygon listhasZ- has z flaghasM- has m flag- Returns:
- multi polygon
-
createMultiPolygon
public MultiPolygon createMultiPolygon(List<Polygon> polygonList)
Convert a list ofPolygonto aMultiPolygon- Parameters:
polygonList- polygon list- Returns:
- multi polygon
-
createMultiPolygon
public MultiPolygon createMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Convert a list ofPolygonto aMultiPolygon- Parameters:
polygonList- polygon listhasZ- has z flaghasM- has m flag- Returns:
- multi polygon
-
toMultiPolygonFromOptions
public MultiPolygon toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions)
Convert aMultiPolygonOptionsto aMultiPolygon- Parameters:
multiPolygonOptions- multi polygon options- Returns:
- multi polygon
-
toMultiPolygonFromOptions
public MultiPolygon toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)
Convert a list ofPolygonOptionsto aMultiPolygon- Parameters:
multiPolygonOptions- multi polygon optionshasZ- has z flaghasM- has m flag- Returns:
- multi polygon
-
toPolylines
public MultiPolylineOptions toPolylines(CompoundCurve compoundCurve)
Convert aCompoundCurveto aMultiPolylineOptions- Parameters:
compoundCurve- compound curve- Returns:
- multi polyline options
-
toCompoundCurve
public CompoundCurve toCompoundCurve(List<Polyline> polylineList)
Convert a list ofPolylineto aCompoundCurve- Parameters:
polylineList- polyline list- Returns:
- compound curve
-
toCompoundCurve
public CompoundCurve toCompoundCurve(List<Polyline> polylineList, boolean hasZ, boolean hasM)
Convert a list ofPolylineto aCompoundCurve- Parameters:
polylineList- polyline listhasZ- has z flaghasM- has m flag- Returns:
- compound curve
-
toCompoundCurveWithOptions
public CompoundCurve toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions)
Convert aMultiPolylineOptionsto aCompoundCurve- Parameters:
multiPolylineOptions- multi polyline options- Returns:
- compound curve
-
toCompoundCurveWithOptions
public CompoundCurve toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
Convert aMultiPolylineOptionsto aCompoundCurve- Parameters:
multiPolylineOptions- multi polyline optionshasZ- has z flaghasM- has m flag- Returns:
- compound curve
-
toPolygons
public MultiPolygonOptions toPolygons(PolyhedralSurface polyhedralSurface)
Convert aPolyhedralSurfaceto aMultiPolygonOptions- Parameters:
polyhedralSurface- polyhedral surface- Returns:
- multi polygon options
-
toPolyhedralSurface
public PolyhedralSurface toPolyhedralSurface(List<Polygon> polygonList)
Convert a list ofPolygonto aPolyhedralSurface- Parameters:
polygonList- polygon list- Returns:
- polyhedral surface
-
toPolyhedralSurface
public PolyhedralSurface toPolyhedralSurface(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Convert a list ofPolygonto aPolyhedralSurface- Parameters:
polygonList- polygon listhasZ- has z flaghasM- has m flag- Returns:
- polyhedral surface
-
toPolyhedralSurfaceWithOptions
public PolyhedralSurface toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions)
Convert aMultiPolygonOptionsto aPolyhedralSurface- Parameters:
multiPolygonOptions- multi polygon options- Returns:
- polyhedral surface
-
toPolyhedralSurfaceWithOptions
public PolyhedralSurface toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)
Convert aMultiPolygonOptionsto aPolyhedralSurface- Parameters:
multiPolygonOptions- multi polygon optionshasZ- has z flaghasM- has m flag- Returns:
- polyhedral surface
-
toShape
public GoogleMapShape toShape(Geometry geometry)
Convert aGeometryto a Map shape- Parameters:
geometry- geometry- Returns:
- google map shape
-
toShapes
public List<GoogleMapShape> toShapes(GeometryCollection<Geometry> geometryCollection)
Convert aGeometryCollectionto a list of Map shapes- Parameters:
geometryCollection- geometry collection- Returns:
- google map shapes
-
addToMap
public GoogleMapShape addToMap(GoogleMap map, Geometry geometry)
Convert aGeometryto a Map shape and add it- Parameters:
map- google mapgeometry- geometry- Returns:
- google map shape
-
addShapeToMap
public static GoogleMapShape addShapeToMap(GoogleMap map, GoogleMapShape shape)
Add a shape to the map- Parameters:
map- google mapshape- google map shape- Returns:
- google map shape
-
addLatLngToMap
public static Marker addLatLngToMap(GoogleMap map, LatLng latLng)
Add a LatLng to the map- Parameters:
map- google maplatLng- lat lng- Returns:
- marker
-
addMarkerOptionsToMap
public static Marker addMarkerOptionsToMap(GoogleMap map, MarkerOptions options)
Add MarkerOptions to the map- Parameters:
map- google mapoptions- marker options- Returns:
- marker
-
addLatLngToMap
public static Marker addLatLngToMap(GoogleMap map, LatLng latLng, MarkerOptions options)
Add a LatLng to the map- Parameters:
map- google maplatLng- lat lngoptions- marker options- Returns:
- marker
-
addPolylineToMap
public static Polyline addPolylineToMap(GoogleMap map, PolylineOptions polyline)
Add a Polyline to the map- Parameters:
map- google mappolyline- polyline options- Returns:
- polyline
-
addPolygonToMap
public static Polygon addPolygonToMap(GoogleMap map, PolygonOptions polygon)
Add a Polygon to the map- Parameters:
map- google mappolygon- polygon options- Returns:
- polygon
-
addLatLngsToMap
public static MultiMarker addLatLngsToMap(GoogleMap map, MultiLatLng latLngs)
Add a list of LatLngs to the map- Parameters:
map- google maplatLngs- lat lngs- Returns:
- multi marker
-
addPolylinesToMap
public static MultiPolyline addPolylinesToMap(GoogleMap map, MultiPolylineOptions polylines)
Add a list of Polylines to the map- Parameters:
map- google mappolylines- multi polyline options- Returns:
- multi polyline
-
addPolygonsToMap
public static MultiPolygon addPolygonsToMap(GoogleMap map, MultiPolygonOptions polygons)
Add a list of Polygons to the map- Parameters:
map- google mappolygons- multi polygon options- Returns:
- multi polygon
-
addToMap
public List<GoogleMapShape> addToMap(GoogleMap map, GeometryCollection<Geometry> geometryCollection)
Convert aGeometryCollectionto a list of Map shapes and add to the map- Parameters:
map- google mapgeometryCollection- geometry collection- Returns:
- google map shapes
-
addShapeToMapAsMarkers
public GoogleMapShapeMarkers addShapeToMapAsMarkers(GoogleMap map, GoogleMapShape shape, MarkerOptions markerOptions, MarkerOptions polylineMarkerOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolylineOptions globalPolylineOptions, PolygonOptions globalPolygonOptions)
Add a shape to the map as markers- Parameters:
map- google mapshape- google map shapemarkerOptions- marker optionspolylineMarkerOptions- polyline marker optionspolygonMarkerOptions- polygon marker optionspolygonMarkerHoleOptions- polygon marker hole optionsglobalPolylineOptions- global polyline optionsglobalPolygonOptions- global polygon options- Returns:
- google map shape markers
-
addPointsToMapAsMarkers
public List<Marker> addPointsToMapAsMarkers(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds)
Add the list of points as markers- Parameters:
map- google mappoints- pointscustomMarkerOptions- custom marker optionsignoreIdenticalEnds- ignore identical ends flag- Returns:
- list of markers
-
addPolylineToMapAsMarkers
public PolylineMarkers addPolylineToMapAsMarkers(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)
Add a Polyline to the map as markers- Parameters:
map- google mappolylineOptions- polyline optionspolylineMarkerOptions- polyline marker optionsglobalPolylineOptions- global polyline options- Returns:
- polyline markers
-
addPolygonToMapAsMarkers
public PolygonMarkers addPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)
Add a Polygon to the map as markers- Parameters:
shapeMarkers- google map shape markersmap- google mappolygonOptions- polygon optionspolygonMarkerOptions- polygon marker optionspolygonMarkerHoleOptions- polygon marker hole optionsglobalPolygonOptions- global polygon options- Returns:
- polygon markers
-
addMultiPolylineToMapAsMarkers
public MultiPolylineMarkers addMultiPolylineToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)
Add a MultiPolylineOptions to the map as markers- Parameters:
shapeMarkers- google map shape markersmap- google mapmultiPolyline- multi polyline optionspolylineMarkerOptions- polyline marker optionsglobalPolylineOptions- global polyline options- Returns:
- multi polyline markers
-
addMultiPolygonToMapAsMarkers
public MultiPolygonMarkers addMultiPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)
Add a MultiPolygonOptions to the map as markers- Parameters:
shapeMarkers- google map shape markersmap- google mapmultiPolygon- multi polygon optionspolygonMarkerOptions- polygon marker optionspolygonMarkerHoleOptions- polygon marker hole optionsglobalPolygonOptions- global polygon options- Returns:
- multi polygon markers
-
getPointsFromMarkers
public List<LatLng> getPointsFromMarkers(List<Marker> markers)
Get a list of points as LatLng from a list of Markers- Parameters:
markers- list of markers- Returns:
- lat lngs
-
toGeometry
public Geometry toGeometry(GoogleMapShape shape)
Convert a GoogleMapShape to a Geometry- Parameters:
shape- google map shape- Returns:
- geometry
-
boundingBoxToWebMercator
public BoundingBox boundingBoxToWebMercator(BoundingBox boundingBox)
Transform the bounding box in the feature projection to web mercator- Parameters:
boundingBox- bounding box in feature projection- Returns:
- bounding box in web mercator
-
boundingBoxToWgs84
public BoundingBox boundingBoxToWgs84(BoundingBox boundingBox)
Transform the bounding box in the feature projection to WGS84- Parameters:
boundingBox- bounding box in feature projection- Returns:
- bounding box in WGS84
-
boundingBoxFromWebMercator
public BoundingBox boundingBoxFromWebMercator(BoundingBox boundingBox)
Transform the bounding box in web mercator to the feature projection- Parameters:
boundingBox- bounding box in web mercator- Returns:
- bounding box in the feature projection
-
boundingBoxFromWgs84
public BoundingBox boundingBoxFromWgs84(BoundingBox boundingBox)
Transform the bounding box in WGS84 to the feature projection- Parameters:
boundingBox- bounding box in WGS84- Returns:
- bounding box in the feature projection
-
-