Package mil.nga.geopackage.map.geom
Class GoogleMapShapeConverter
java.lang.Object
mil.nga.geopackage.map.geom.GoogleMapShapeConverter
Provides conversions methods between geometry object and Google Maps Android
API v2 Shapes
-
Constructor Summary
ConstructorDescriptionConstructorGoogleMapShapeConverter
(Projection projection) Constructor with specified projection, seeUserCoreDao.getProjection()
-
Method Summary
Modifier and TypeMethodDescriptionstatic MultiMarker
addLatLngsToMap
(GoogleMap map, MultiLatLng latLngs) Add a list of LatLngs to the mapstatic Marker
addLatLngToMap
(GoogleMap map, LatLng latLng) Add a LatLng to the mapstatic Marker
addLatLngToMap
(GoogleMap map, LatLng latLng, MarkerOptions options) Add a LatLng to the mapstatic Marker
addMarkerOptionsToMap
(GoogleMap map, MarkerOptions options) Add MarkerOptions to the mapaddMultiPolygonToMapAsMarkers
(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) Add a MultiPolygonOptions to the map as markersaddMultiPolylineToMapAsMarkers
(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions) Add a MultiPolylineOptions to the map as markersaddPointsToMapAsMarkers
(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds) Add the list of points as markersstatic MultiPolygon
addPolygonsToMap
(GoogleMap map, MultiPolygonOptions polygons) Add a list of Polygons to the mapstatic Polygon
addPolygonToMap
(GoogleMap map, PolygonOptions polygon) Add a Polygon to the mapaddPolygonToMapAsMarkers
(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions) Add a Polygon to the map as markersstatic MultiPolyline
addPolylinesToMap
(GoogleMap map, MultiPolylineOptions polylines) Add a list of Polylines to the mapstatic Polyline
addPolylineToMap
(GoogleMap map, PolylineOptions polyline) Add a Polyline to the mapaddPolylineToMapAsMarkers
(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions) Add a Polyline to the map as markersstatic GoogleMapShape
addShapeToMap
(GoogleMap map, GoogleMapShape shape) Add a shape to the mapaddShapeToMapAsMarkers
(GoogleMap map, GoogleMapShape shape, MarkerOptions markerOptions, MarkerOptions polylineMarkerOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolylineOptions globalPolylineOptions, PolygonOptions globalPolygonOptions) Add a shape to the map as markersConvert aGeometry
to a Map shape and add itaddToMap
(GoogleMap map, GeometryCollection<Geometry> geometryCollection) Convert aGeometryCollection
to a list of Map shapes and add to the mapboundingBoxFromWebMercator
(BoundingBox boundingBox) Transform the bounding box in web mercator to the feature projectionboundingBoxFromWgs84
(BoundingBox boundingBox) Transform the bounding box in WGS84 to the feature projectionboundingBoxToWebMercator
(BoundingBox boundingBox) Transform the bounding box in the feature projection to web mercatorboundingBoxToWgs84
(BoundingBox boundingBox) Transform the bounding box in the feature projection to WGS84void
closePolygonRing
(List<LatLng> points) Close the polygon ring (exterior or hole) points if neededcreateMultiPolygon
(List<Polygon> polygonList) Convert a list ofPolygon
to aMultiPolygon
createMultiPolygon
(List<Polygon> polygonList, boolean hasZ, boolean hasM) Convert a list ofPolygon
to aMultiPolygon
Get exterior orientation for conversions.Get polygon hole orientation for conversions.getOrientation
(List<LatLng> points) Determine the closed points orientationgetPointsFromMarkers
(List<Marker> markers) Get a list of points as LatLng from a list of MarkersGet the projectionGet the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer pointsvoid
populateLineString
(LineString lineString, List<LatLng> latLngs) Convert a list ofLatLng
to aLineString
void
setExteriorOrientation
(PolygonOrientation exteriorOrientation) Set the exterior orientation for conversions, set to null to maintain orientationvoid
setHoleOrientation
(PolygonOrientation holeOrientation) Set the polygon hole orientation for conversions, set to null to maintain orientationvoid
setSimplifyTolerance
(Double simplifyTolerance) Set the simplify tolerance in meters to simplify lines and polygons to similar curves with fewer pointstoCircularString
(List<LatLng> latLngs) Convert a list ofLatLng
to aCircularString
toCircularString
(List<LatLng> latLngs, boolean hasZ, boolean hasM) Convert a list ofLatLng
to aCircularString
toCompoundCurve
(List<Polyline> polylineList) Convert a list ofPolyline
to aCompoundCurve
toCompoundCurve
(List<Polyline> polylineList, boolean hasZ, boolean hasM) Convert a list ofPolyline
to aCompoundCurve
toCompoundCurveFromList
(List<List<LatLng>> polylineList) Convert a list of LatLng lists to aCompoundCurve
toCompoundCurveFromList
(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM) Convert a list of LatLng lists to aCompoundCurve
toCompoundCurveFromOptions
(MultiPolylineOptions multiPolylineOptions) Convert aMultiPolylineOptions
to aCompoundCurve
toCompoundCurveFromOptions
(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aCompoundCurve
toCompoundCurveWithOptions
(MultiPolylineOptions multiPolylineOptions) Convert aMultiPolylineOptions
to aCompoundCurve
toCompoundCurveWithOptions
(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aCompoundCurve
toCurvePolygon
(CurvePolygon<Curve> curvePolygon) Convert aCurvePolygon
to aPolygonOptions
toGeometry
(GoogleMapShape shape) Convert a GoogleMapShape to a GeometrytoLatLngs
(MultiPoint multiPoint) Convert aMultiPoint
to aMultiLatLng
toLineString
(Polyline polyline) Convert aPolyline
to aLineString
toLineString
(PolylineOptions polyline) Convert aPolylineOptions
to aLineString
toLineString
(PolylineOptions polyline, boolean hasZ, boolean hasM) Convert aPolylineOptions
to aLineString
toLineString
(Polyline polyline, boolean hasZ, boolean hasM) Convert aPolyline
to aLineString
toLineString
(List<LatLng> latLngs) Convert a list ofLatLng
to aLineString
toLineString
(List<LatLng> latLngs, boolean hasZ, boolean hasM) Convert a list ofLatLng
to aLineString
toMultiLineString
(List<Polyline> polylineList) Convert a list ofPolyline
to aMultiLineString
toMultiLineString
(List<Polyline> polylineList, boolean hasZ, boolean hasM) Convert a list ofPolyline
to aMultiLineString
toMultiLineStringFromList
(List<List<LatLng>> polylineList) Convert a list of LatLng lists to aMultiLineString
toMultiLineStringFromList
(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM) Convert a list of LatLng lists to aMultiLineString
toMultiLineStringFromOptions
(MultiPolylineOptions multiPolylineOptions) Convert aMultiPolylineOptions
to aMultiLineString
toMultiLineStringFromOptions
(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aMultiLineString
toMultiPoint
(List<LatLng> latLngs) Convert aMultiLatLng
to aMultiPoint
toMultiPoint
(List<LatLng> latLngs, boolean hasZ, boolean hasM) Convert aMultiLatLng
to aMultiPoint
toMultiPoint
(MultiLatLng latLngs) Convert aMultiLatLng
to aMultiPoint
toMultiPoint
(MultiLatLng latLngs, boolean hasZ, boolean hasM) Convert aMultiLatLng
to aMultiPoint
toMultiPolygon
(List<Polygon> polygonList) Convert a list ofPolygon
to aMultiPolygon
toMultiPolygon
(List<Polygon> polygonList, boolean hasZ, boolean hasM) Convert a list ofPolygon
to aMultiPolygon
toMultiPolygonFromOptions
(MultiPolygonOptions multiPolygonOptions) Convert aMultiPolygonOptions
to aMultiPolygon
toMultiPolygonFromOptions
(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) Convert a list ofPolygonOptions
to aMultiPolygon
toPolygon
(PolygonOptions polygon) toPolygon
(PolygonOptions polygon, boolean hasZ, boolean hasM) Convert aPolygon
to aPolygonOptions
toPolygons
(MultiPolygon multiPolygon) Convert aMultiPolygon
to aMultiPolygonOptions
toPolygons
(PolyhedralSurface polyhedralSurface) Convert aPolyhedralSurface
to aMultiPolygonOptions
toPolyhedralSurface
(List<Polygon> polygonList) Convert a list ofPolygon
to aPolyhedralSurface
toPolyhedralSurface
(List<Polygon> polygonList, boolean hasZ, boolean hasM) Convert a list ofPolygon
to aPolyhedralSurface
toPolyhedralSurfaceWithOptions
(MultiPolygonOptions multiPolygonOptions) Convert aMultiPolygonOptions
to aPolyhedralSurface
toPolyhedralSurfaceWithOptions
(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) Convert aMultiPolygonOptions
to aPolyhedralSurface
toPolyline
(LineString lineString) Convert aLineString
to aPolylineOptions
toPolylines
(CompoundCurve compoundCurve) Convert aCompoundCurve
to aMultiPolylineOptions
toPolylines
(MultiLineString multiLineString) Convert aMultiLineString
to aMultiPolylineOptions
toProjection
(Point point) Transform a WGS84 point to the projectionConvert aGeometry
to a Map shapetoShapes
(GeometryCollection<Geometry> geometryCollection) Convert aGeometryCollection
to a list of Map shapesTransform a projection point to WGS84
-
Constructor Details
-
GoogleMapShapeConverter
public GoogleMapShapeConverter()Constructor- Since:
- 1.3.2
-
GoogleMapShapeConverter
Constructor with specified projection, seeUserCoreDao.getProjection()
- Parameters:
projection
- projection
-
-
Method Details
-
getProjection
Get the projection- Returns:
- projection
-
getExteriorOrientation
Get exterior orientation for conversions. Defaults to PolygonOrientation.COUNTERCLOCKWISE- Returns:
- exterior orientation
- Since:
- 1.3.2
-
setExteriorOrientation
Set the exterior orientation for conversions, set to null to maintain orientation- Parameters:
exteriorOrientation
- orientation- Since:
- 1.3.2
-
getHoleOrientation
Get polygon hole orientation for conversions. Defaults to PolygonOrientation.CLOCKWISE- Returns:
- hole orientation
- Since:
- 1.3.2
-
setHoleOrientation
Set the polygon hole orientation for conversions, set to null to maintain orientation- Parameters:
holeOrientation
- orientation- Since:
- 1.3.2
-
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
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
Transform a projection point to WGS84- Parameters:
point
- projection point- Returns:
- WGS84 point
-
toProjection
Transform a WGS84 point to the projection- Parameters:
point
- WGS84 point- Returns:
- projection point
-
toLatLng
- Parameters:
point
- point- Returns:
- lat lng
-
toPoint
- Parameters:
latLng
- lat lng- Returns:
- point
-
toPoint
- Parameters:
latLng
- lat lnghasZ
- has z flaghasM
- has m flag- Returns:
- point
-
toPolyline
Convert aLineString
to aPolylineOptions
- Parameters:
lineString
- line string- Returns:
- polyline options
-
toLineString
Convert aPolyline
to aLineString
- Parameters:
polyline
- polyline- Returns:
- line string
-
toLineString
Convert aPolyline
to aLineString
- Parameters:
polyline
- polylinehasZ
- has z flaghasM
- has m flag- Returns:
- line string
-
toLineString
Convert aPolylineOptions
to aLineString
- Parameters:
polyline
- polyline options- Returns:
- line string
-
toLineString
Convert aPolylineOptions
to aLineString
- Parameters:
polyline
- polyline optionshasZ
- has z flaghasM
- has m flag- Returns:
- line string
-
toLineString
Convert a list ofLatLng
to aLineString
- Parameters:
latLngs
- lat lngs- Returns:
- line string
-
toLineString
Convert a list ofLatLng
to aLineString
- Parameters:
latLngs
- lat lngshasZ
- has z flaghasM
- has m flag- Returns:
- line string
-
toCircularString
Convert a list ofLatLng
to aCircularString
- Parameters:
latLngs
- lat lngs- Returns:
- circular string
-
toCircularString
Convert a list ofLatLng
to aCircularString
- Parameters:
latLngs
- lat lngshasZ
- has z flaghasM
- has m flag- Returns:
- circular string
-
populateLineString
Convert a list ofLatLng
to aLineString
- Parameters:
lineString
- line stringlatLngs
- lat lngs
-
toPolygon
Convert aPolygon
to aPolygonOptions
- Parameters:
polygon
- polygon- Returns:
- polygon options
-
toCurvePolygon
Convert aCurvePolygon
to aPolygonOptions
- Parameters:
curvePolygon
- curve polygon- Returns:
- polygon options
- Since:
- 1.4.1
-
toPolygon
- Parameters:
polygon
- polygon- Returns:
- polygon
-
toPolygon
- Parameters:
polygon
- polygonhasZ
- has z flaghasM
- has m flag- Returns:
- polygon
-
toPolygon
- Parameters:
polygon
- polygon options- Returns:
- polygon
-
toPolygon
- Parameters:
polygon
- polygon optionshasZ
- has z flaghasM
- has m flag- Returns:
- polygon
-
toPolygon
- 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
Close the polygon ring (exterior or hole) points if needed- Parameters:
points
- ring points- Since:
- 1.3.2
-
getOrientation
Determine the closed points orientation- Parameters:
points
- closed points- Returns:
- orientation
- Since:
- 1.3.2
-
toLatLngs
Convert aMultiPoint
to aMultiLatLng
- Parameters:
multiPoint
- multi point- Returns:
- multi lat lng
-
toMultiPoint
Convert aMultiLatLng
to aMultiPoint
- Parameters:
latLngs
- lat lngs- Returns:
- multi point
-
toMultiPoint
Convert aMultiLatLng
to aMultiPoint
- Parameters:
latLngs
- lat lngshasZ
- has z flaghasM
- has m flag- Returns:
- multi point
-
toMultiPoint
Convert aMultiLatLng
to aMultiPoint
- Parameters:
latLngs
- lat lngs- Returns:
- multi point
-
toMultiPoint
Convert aMultiLatLng
to aMultiPoint
- Parameters:
latLngs
- lat lngshasZ
- has z flaghasM
- has m flag- Returns:
- multi point
-
toPolylines
Convert aMultiLineString
to aMultiPolylineOptions
- Parameters:
multiLineString
- multi line string- Returns:
- multi polyline options
-
toMultiLineString
Convert a list ofPolyline
to aMultiLineString
- Parameters:
polylineList
- polyline list- Returns:
- multi line string
-
toMultiLineString
Convert a list ofPolyline
to aMultiLineString
- Parameters:
polylineList
- polyline listhasZ
- has z flaghasM
- has m flag- Returns:
- multi line string
-
toMultiLineStringFromList
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
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
Convert aMultiPolylineOptions
to aMultiLineString
- Parameters:
multiPolylineOptions
- multi polyline options- Returns:
- multi line string
-
toMultiLineStringFromOptions
public MultiLineString toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aMultiLineString
- Parameters:
multiPolylineOptions
- multi polyline optionshasZ
- has z flaghasM
- has m flag- Returns:
- multi line string
-
toCompoundCurveFromOptions
Convert aMultiPolylineOptions
to aCompoundCurve
- Parameters:
multiPolylineOptions
- multi polyline options- Returns:
- compound curve
-
toCompoundCurveFromOptions
public CompoundCurve toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aCompoundCurve
- Parameters:
multiPolylineOptions
- multi polyline optionshasZ
- has z flaghasM
- has m flag- Returns:
- compound curve
-
toPolygons
Convert aMultiPolygon
to aMultiPolygonOptions
- Parameters:
multiPolygon
- multi polygon- Returns:
- multi polygon options
-
toMultiPolygon
Convert a list ofPolygon
to aMultiPolygon
- Parameters:
polygonList
- polygon list- Returns:
- multi polygon
-
toMultiPolygon
Convert a list ofPolygon
to aMultiPolygon
- Parameters:
polygonList
- polygon listhasZ
- has z flaghasM
- has m flag- Returns:
- multi polygon
-
createMultiPolygon
Convert a list ofPolygon
to aMultiPolygon
- Parameters:
polygonList
- polygon list- Returns:
- multi polygon
-
createMultiPolygon
Convert a list ofPolygon
to aMultiPolygon
- Parameters:
polygonList
- polygon listhasZ
- has z flaghasM
- has m flag- Returns:
- multi polygon
-
toMultiPolygonFromOptions
Convert aMultiPolygonOptions
to aMultiPolygon
- Parameters:
multiPolygonOptions
- multi polygon options- Returns:
- multi polygon
-
toMultiPolygonFromOptions
public MultiPolygon toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) Convert a list ofPolygonOptions
to aMultiPolygon
- Parameters:
multiPolygonOptions
- multi polygon optionshasZ
- has z flaghasM
- has m flag- Returns:
- multi polygon
-
toPolylines
Convert aCompoundCurve
to aMultiPolylineOptions
- Parameters:
compoundCurve
- compound curve- Returns:
- multi polyline options
-
toCompoundCurve
Convert a list ofPolyline
to aCompoundCurve
- Parameters:
polylineList
- polyline list- Returns:
- compound curve
-
toCompoundCurve
Convert a list ofPolyline
to aCompoundCurve
- Parameters:
polylineList
- polyline listhasZ
- has z flaghasM
- has m flag- Returns:
- compound curve
-
toCompoundCurveWithOptions
Convert aMultiPolylineOptions
to aCompoundCurve
- Parameters:
multiPolylineOptions
- multi polyline options- Returns:
- compound curve
-
toCompoundCurveWithOptions
public CompoundCurve toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM) Convert aMultiPolylineOptions
to aCompoundCurve
- Parameters:
multiPolylineOptions
- multi polyline optionshasZ
- has z flaghasM
- has m flag- Returns:
- compound curve
-
toPolygons
Convert aPolyhedralSurface
to aMultiPolygonOptions
- Parameters:
polyhedralSurface
- polyhedral surface- Returns:
- multi polygon options
-
toPolyhedralSurface
Convert a list ofPolygon
to aPolyhedralSurface
- Parameters:
polygonList
- polygon list- Returns:
- polyhedral surface
-
toPolyhedralSurface
Convert a list ofPolygon
to aPolyhedralSurface
- Parameters:
polygonList
- polygon listhasZ
- has z flaghasM
- has m flag- Returns:
- polyhedral surface
-
toPolyhedralSurfaceWithOptions
Convert aMultiPolygonOptions
to aPolyhedralSurface
- Parameters:
multiPolygonOptions
- multi polygon options- Returns:
- polyhedral surface
-
toPolyhedralSurfaceWithOptions
public PolyhedralSurface toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) Convert aMultiPolygonOptions
to aPolyhedralSurface
- Parameters:
multiPolygonOptions
- multi polygon optionshasZ
- has z flaghasM
- has m flag- Returns:
- polyhedral surface
-
toShape
Convert aGeometry
to a Map shape- Parameters:
geometry
- geometry- Returns:
- google map shape
-
toShapes
Convert aGeometryCollection
to a list of Map shapes- Parameters:
geometryCollection
- geometry collection- Returns:
- google map shapes
-
addToMap
Convert aGeometry
to a Map shape and add it- Parameters:
map
- google mapgeometry
- geometry- Returns:
- google map shape
-
addShapeToMap
Add a shape to the map- Parameters:
map
- google mapshape
- google map shape- Returns:
- google map shape
-
addLatLngToMap
Add a LatLng to the map- Parameters:
map
- google maplatLng
- lat lng- Returns:
- marker
-
addMarkerOptionsToMap
Add MarkerOptions to the map- Parameters:
map
- google mapoptions
- marker options- Returns:
- marker
-
addLatLngToMap
Add a LatLng to the map- Parameters:
map
- google maplatLng
- lat lngoptions
- marker options- Returns:
- marker
-
addPolylineToMap
Add a Polyline to the map- Parameters:
map
- google mappolyline
- polyline options- Returns:
- polyline
-
addPolygonToMap
Add a Polygon to the map- Parameters:
map
- google mappolygon
- polygon options- Returns:
- polygon
-
addLatLngsToMap
Add a list of LatLngs to the map- Parameters:
map
- google maplatLngs
- lat lngs- Returns:
- multi marker
-
addPolylinesToMap
Add a list of Polylines to the map- Parameters:
map
- google mappolylines
- multi polyline options- Returns:
- multi polyline
-
addPolygonsToMap
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 aGeometryCollection
to 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
Get a list of points as LatLng from a list of Markers- Parameters:
markers
- list of markers- Returns:
- lat lngs
-
toGeometry
Convert a GoogleMapShape to a Geometry- Parameters:
shape
- google map shape- Returns:
- geometry
-
boundingBoxToWebMercator
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
Transform the bounding box in the feature projection to WGS84- Parameters:
boundingBox
- bounding box in feature projection- Returns:
- bounding box in WGS84
-
boundingBoxFromWebMercator
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
Transform the bounding box in WGS84 to the feature projection- Parameters:
boundingBox
- bounding box in WGS84- Returns:
- bounding box in the feature projection
-