public class GoogleMapShapeConverter extends Object
| Constructor and Description |
|---|
GoogleMapShapeConverter(Projection projection)
Constructor with specified projection, see
FeatureDao#getProjection |
| Modifier and Type | Method and Description |
|---|---|
static MultiMarker |
addLatLngsToMap(GoogleMap map,
MultiLatLng latLngs)
Add a list of LatLngs to the map
|
static Marker |
addLatLngToMap(GoogleMap map,
LatLng latLng)
Add a LatLng to the map
|
static Marker |
addLatLngToMap(GoogleMap map,
LatLng latLng,
MarkerOptions options)
Add a LatLng to the map
|
static Marker |
addMarkerOptionsToMap(GoogleMap map,
MarkerOptions options)
Add MarkerOptions to the map
|
MultiPolygonMarkers |
addMultiPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers,
GoogleMap map,
MultiPolygonOptions multiPolygon,
MarkerOptions polygonMarkerOptions,
MarkerOptions polygonMarkerHoleOptions,
PolygonOptions globalPolygonOptions)
Add a MultiPolygonOptions to the map as markers
|
MultiPolylineMarkers |
addMultiPolylineToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers,
GoogleMap map,
MultiPolylineOptions multiPolyline,
MarkerOptions polylineMarkerOptions,
PolylineOptions globalPolylineOptions)
Add a MultiPolylineOptions to the map as markers
|
List<Marker> |
addPointsToMapAsMarkers(GoogleMap map,
List<LatLng> points,
MarkerOptions customMarkerOptions,
boolean ignoreIdenticalEnds)
Add the list of points as markers
|
static MultiPolygon |
addPolygonsToMap(GoogleMap map,
MultiPolygonOptions polygons)
Add a list of Polygons to the map
|
static com.google.android.gms.maps.model.Polygon |
addPolygonToMap(GoogleMap map,
PolygonOptions polygon)
Add a Polygon to the map
|
PolygonMarkers |
addPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers,
GoogleMap map,
PolygonOptions polygonOptions,
MarkerOptions polygonMarkerOptions,
MarkerOptions polygonMarkerHoleOptions,
PolygonOptions globalPolygonOptions)
Add a Polygon to the map as markers
|
static MultiPolyline |
addPolylinesToMap(GoogleMap map,
MultiPolylineOptions polylines)
Add a list of Polylines to the map
|
static Polyline |
addPolylineToMap(GoogleMap map,
PolylineOptions polyline)
Add a Polyline to the map
|
PolylineMarkers |
addPolylineToMapAsMarkers(GoogleMap map,
PolylineOptions polylineOptions,
MarkerOptions polylineMarkerOptions,
PolylineOptions globalPolylineOptions)
Add a Polyline to the map as markers
|
static GoogleMapShape |
addShapeToMap(GoogleMap map,
GoogleMapShape shape)
Add a shape to the map
|
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
|
GoogleMapShape |
addToMap(GoogleMap map,
Geometry geometry)
Convert a
Geometry to a Map shape and add it |
List<GoogleMapShape> |
addToMap(GoogleMap map,
GeometryCollection<Geometry> geometryCollection)
Convert a
GeometryCollection to a list of Map shapes and add to
the map |
MultiPolygon |
createMultiPolygon(List<Polygon> polygonList)
Convert a list of
Polygon to a MultiPolygon |
MultiPolygon |
createMultiPolygon(List<Polygon> polygonList,
boolean hasZ,
boolean hasM)
Convert a list of
Polygon to a MultiPolygon |
List<LatLng> |
getPointsFromMarkers(List<Marker> markers)
Get a list of points as LatLng from a list of Markers
|
Projection |
getProjection()
Get the projection
|
void |
populateLineString(LineString lineString,
List<LatLng> latLngs)
Convert a list of
LatLng to a LineString |
CircularString |
toCircularString(List<LatLng> latLngs)
Convert a list of
LatLng to a CircularString |
CircularString |
toCircularString(List<LatLng> latLngs,
boolean hasZ,
boolean hasM)
Convert a list of
LatLng to a CircularString |
CompoundCurve |
toCompoundCurve(List<Polyline> polylineList)
Convert a list of
Polyline to a CompoundCurve |
CompoundCurve |
toCompoundCurve(List<Polyline> polylineList,
boolean hasZ,
boolean hasM)
Convert a list of
Polyline to a CompoundCurve |
CompoundCurve |
toCompoundCurveFromList(List<List<LatLng>> polylineList)
Convert a list of List
CompoundCurve |
CompoundCurve |
toCompoundCurveFromList(List<List<LatLng>> polylineList,
boolean hasZ,
boolean hasM)
Convert a list of List
CompoundCurve |
CompoundCurve |
toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions)
Convert a
MultiPolylineOptions to a CompoundCurve |
CompoundCurve |
toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions,
boolean hasZ,
boolean hasM)
Convert a
MultiPolylineOptions to a CompoundCurve |
CompoundCurve |
toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions)
Convert a
MultiPolylineOptions to a CompoundCurve |
CompoundCurve |
toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions,
boolean hasZ,
boolean hasM)
Convert a
MultiPolylineOptions to a CompoundCurve |
Geometry |
toGeometry(GoogleMapShape shape)
Convert a GoogleMapShape to a Geometry
|
LatLng |
toLatLng(Point point)
Convert a
Point to a LatLng |
MultiLatLng |
toLatLngs(MultiPoint multiPoint)
Convert a
MultiPoint to a MultiLatLng |
LineString |
toLineString(List<LatLng> latLngs)
Convert a list of
LatLng to a LineString |
LineString |
toLineString(List<LatLng> latLngs,
boolean hasZ,
boolean hasM)
Convert a list of
LatLng to a LineString |
LineString |
toLineString(Polyline polyline)
Convert a
Polyline to a LineString |
LineString |
toLineString(Polyline polyline,
boolean hasZ,
boolean hasM)
Convert a
Polyline to a LineString |
LineString |
toLineString(PolylineOptions polyline)
Convert a
PolylineOptions to a LineString |
LineString |
toLineString(PolylineOptions polyline,
boolean hasZ,
boolean hasM)
Convert a
PolylineOptions to a LineString |
MultiLineString |
toMultiLineString(List<Polyline> polylineList)
Convert a list of
Polyline to a MultiLineString |
MultiLineString |
toMultiLineString(List<Polyline> polylineList,
boolean hasZ,
boolean hasM)
Convert a list of
Polyline to a MultiLineString |
MultiLineString |
toMultiLineStringFromList(List<List<LatLng>> polylineList)
Convert a list of List
MultiLineString |
MultiLineString |
toMultiLineStringFromList(List<List<LatLng>> polylineList,
boolean hasZ,
boolean hasM)
Convert a list of List
MultiLineString |
MultiLineString |
toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions)
Convert a
MultiPolylineOptions to a MultiLineString |
MultiLineString |
toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions,
boolean hasZ,
boolean hasM)
Convert a
MultiPolylineOptions to a MultiLineString |
MultiPoint |
toMultiPoint(List<LatLng> latLngs)
Convert a
MultiLatLng to a MultiPoint |
MultiPoint |
toMultiPoint(List<LatLng> latLngs,
boolean hasZ,
boolean hasM)
Convert a
MultiLatLng to a MultiPoint |
MultiPoint |
toMultiPoint(MultiLatLng latLngs)
Convert a
MultiLatLng to a MultiPoint |
MultiPoint |
toMultiPoint(MultiLatLng latLngs,
boolean hasZ,
boolean hasM)
Convert a
MultiLatLng to a MultiPoint |
MultiPolygon |
toMultiPolygon(List<Polygon> polygonList)
Convert a list of
Polygon to a
MultiPolygon |
MultiPolygon |
toMultiPolygon(List<Polygon> polygonList,
boolean hasZ,
boolean hasM)
Convert a list of
Polygon to a
MultiPolygon |
MultiPolygon |
toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions)
Convert a
MultiPolygonOptions to a MultiPolygon |
MultiPolygon |
toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions,
boolean hasZ,
boolean hasM)
Convert a list of
PolygonOptions to a MultiPolygon |
Point |
toPoint(LatLng latLng)
Convert a
LatLng to a Point |
Point |
toPoint(LatLng latLng,
boolean hasZ,
boolean hasM)
Convert a
LatLng to a Point |
Polygon |
toPolygon(com.google.android.gms.maps.model.Polygon polygon)
|
Polygon |
toPolygon(com.google.android.gms.maps.model.Polygon polygon,
boolean hasZ,
boolean hasM)
|
Polygon |
toPolygon(List<LatLng> latLngs,
List<List<LatLng>> holes)
|
Polygon |
toPolygon(List<LatLng> latLngs,
List<List<LatLng>> holes,
boolean hasZ,
boolean hasM)
|
PolygonOptions |
toPolygon(Polygon polygon)
Convert a
Polygon to a PolygonOptions |
Polygon |
toPolygon(PolygonOptions polygon)
|
Polygon |
toPolygon(PolygonOptions polygon,
boolean hasZ,
boolean hasM)
|
MultiPolygonOptions |
toPolygons(MultiPolygon multiPolygon)
Convert a
MultiPolygon to a MultiPolygonOptions |
MultiPolygonOptions |
toPolygons(PolyhedralSurface polyhedralSurface)
Convert a
PolyhedralSurface to a MultiPolygonOptions |
PolyhedralSurface |
toPolyhedralSurface(List<Polygon> polygonList)
Convert a list of
Polygon to a PolyhedralSurface |
PolyhedralSurface |
toPolyhedralSurface(List<Polygon> polygonList,
boolean hasZ,
boolean hasM)
Convert a list of
Polygon to a PolyhedralSurface |
PolyhedralSurface |
toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions)
Convert a
MultiPolygonOptions to a PolyhedralSurface |
PolyhedralSurface |
toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions,
boolean hasZ,
boolean hasM)
Convert a
MultiPolygonOptions to a PolyhedralSurface |
PolylineOptions |
toPolyline(LineString lineString)
Convert a
LineString to a PolylineOptions |
MultiPolylineOptions |
toPolylines(CompoundCurve compoundCurve)
Convert a
CompoundCurve to a MultiPolylineOptions |
MultiPolylineOptions |
toPolylines(MultiLineString multiLineString)
Convert a
MultiLineString to a MultiPolylineOptions |
Point |
toProjection(Point point)
Transform a WGS84 point to the projection
|
GoogleMapShape |
toShape(Geometry geometry)
Convert a
Geometry to a Map shape |
List<GoogleMapShape> |
toShapes(GeometryCollection<Geometry> geometryCollection)
Convert a
GeometryCollection to a list of Map shapes |
Point |
toWgs84(Point point)
Transform a projection point to WGS84
|
public GoogleMapShapeConverter(Projection projection)
FeatureDao#getProjectionprojection - public Projection getProjection()
public Point toWgs84(Point point)
point - public Point toProjection(Point point)
point - public LatLng toLatLng(Point point)
Point to a LatLngpoint - public Point toPoint(LatLng latLng)
LatLng to a PointlatLng - public Point toPoint(LatLng latLng, boolean hasZ, boolean hasM)
LatLng to a PointlatLng - hasZ - hasM - public PolylineOptions toPolyline(LineString lineString)
LineString to a PolylineOptionslineString - public LineString toLineString(Polyline polyline)
Polyline to a LineStringpolyline - public LineString toLineString(Polyline polyline, boolean hasZ, boolean hasM)
Polyline to a LineStringpolyline - hasZ - hasM - public LineString toLineString(PolylineOptions polyline)
PolylineOptions to a LineStringpolyline - public LineString toLineString(PolylineOptions polyline, boolean hasZ, boolean hasM)
PolylineOptions to a LineStringpolyline - hasZ - hasM - public LineString toLineString(List<LatLng> latLngs)
LatLng to a LineStringlatLngs - public LineString toLineString(List<LatLng> latLngs, boolean hasZ, boolean hasM)
LatLng to a LineStringlatLngs - hasZ - hasM - public CircularString toCircularString(List<LatLng> latLngs)
LatLng to a CircularStringlatLngs - public CircularString toCircularString(List<LatLng> latLngs, boolean hasZ, boolean hasM)
LatLng to a CircularStringlatLngs - hasZ - hasM - public void populateLineString(LineString lineString, List<LatLng> latLngs)
LatLng to a LineStringlineString - latLngs - public PolygonOptions toPolygon(Polygon polygon)
Polygon to a PolygonOptionspolygon - public Polygon toPolygon(com.google.android.gms.maps.model.Polygon polygon)
polygon - public Polygon toPolygon(com.google.android.gms.maps.model.Polygon polygon, boolean hasZ, boolean hasM)
polygon - hasZ - hasM - public Polygon toPolygon(PolygonOptions polygon)
polygon - public Polygon toPolygon(PolygonOptions polygon, boolean hasZ, boolean hasM)
polygon - hasZ - hasM - public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes)
latLngs - holes - public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes, boolean hasZ, boolean hasM)
latLngs - holes - hasZ - hasM - public MultiLatLng toLatLngs(MultiPoint multiPoint)
MultiPoint to a MultiLatLngmultiPoint - public MultiPoint toMultiPoint(MultiLatLng latLngs)
MultiLatLng to a MultiPointlatLngs - public MultiPoint toMultiPoint(MultiLatLng latLngs, boolean hasZ, boolean hasM)
MultiLatLng to a MultiPointlatLngs - hasZ - hasM - public MultiPoint toMultiPoint(List<LatLng> latLngs)
MultiLatLng to a MultiPointlatLngs - public MultiPoint toMultiPoint(List<LatLng> latLngs, boolean hasZ, boolean hasM)
MultiLatLng to a MultiPointlatLngs - hasZ - hasM - public MultiPolylineOptions toPolylines(MultiLineString multiLineString)
MultiLineString to a MultiPolylineOptionsmultiLineString - public MultiLineString toMultiLineString(List<Polyline> polylineList)
Polyline to a MultiLineStringpolylineList - public MultiLineString toMultiLineString(List<Polyline> polylineList, boolean hasZ, boolean hasM)
Polyline to a MultiLineStringpolylineList - hasZ - hasM - public MultiLineString toMultiLineStringFromList(List<List<LatLng>> polylineList)
MultiLineStringpolylineList - public MultiLineString toMultiLineStringFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)
MultiLineStringpolylineList - hasZ - hasM - public CompoundCurve toCompoundCurveFromList(List<List<LatLng>> polylineList)
CompoundCurvepolylineList - public CompoundCurve toCompoundCurveFromList(List<List<LatLng>> polylineList, boolean hasZ, boolean hasM)
CompoundCurvepolylineList - hasZ - hasM - public MultiLineString toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions)
MultiPolylineOptions to a MultiLineStringmultiPolylineOptions - public MultiLineString toMultiLineStringFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
MultiPolylineOptions to a MultiLineStringmultiPolylineOptions - hasZ - hasM - public CompoundCurve toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions)
MultiPolylineOptions to a CompoundCurvemultiPolylineOptions - public CompoundCurve toCompoundCurveFromOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
MultiPolylineOptions to a CompoundCurvemultiPolylineOptions - hasZ - hasM - public MultiPolygonOptions toPolygons(MultiPolygon multiPolygon)
MultiPolygon to a MultiPolygonOptionsmultiPolygon - public MultiPolygon toMultiPolygon(List<Polygon> polygonList)
Polygon to a
MultiPolygonpolygonList - public MultiPolygon toMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Polygon to a
MultiPolygonpolygonList - hasZ - hasM - public MultiPolygon createMultiPolygon(List<Polygon> polygonList)
Polygon to a MultiPolygonpolygonList - public MultiPolygon createMultiPolygon(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Polygon to a MultiPolygonpolygonList - hasZ - hasM - public MultiPolygon toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions)
MultiPolygonOptions to a MultiPolygonmultiPolygonOptions - public MultiPolygon toMultiPolygonFromOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)
PolygonOptions to a MultiPolygonmultiPolygonOptions - hasZ - hasM - public MultiPolylineOptions toPolylines(CompoundCurve compoundCurve)
CompoundCurve to a MultiPolylineOptionscompoundCurve - public CompoundCurve toCompoundCurve(List<Polyline> polylineList)
Polyline to a CompoundCurvepolylineList - public CompoundCurve toCompoundCurve(List<Polyline> polylineList, boolean hasZ, boolean hasM)
Polyline to a CompoundCurvepolylineList - hasZ - hasM - public CompoundCurve toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions)
MultiPolylineOptions to a CompoundCurvemultiPolylineOptions - public CompoundCurve toCompoundCurveWithOptions(MultiPolylineOptions multiPolylineOptions, boolean hasZ, boolean hasM)
MultiPolylineOptions to a CompoundCurvemultiPolylineOptions - hasZ - hasM - public MultiPolygonOptions toPolygons(PolyhedralSurface polyhedralSurface)
PolyhedralSurface to a MultiPolygonOptionspolyhedralSurface - public PolyhedralSurface toPolyhedralSurface(List<Polygon> polygonList)
Polygon to a PolyhedralSurfacepolygonList - public PolyhedralSurface toPolyhedralSurface(List<Polygon> polygonList, boolean hasZ, boolean hasM)
Polygon to a PolyhedralSurfacepolygonList - hasZ - hasM - public PolyhedralSurface toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions)
MultiPolygonOptions to a PolyhedralSurfacemultiPolygonOptions - public PolyhedralSurface toPolyhedralSurfaceWithOptions(MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM)
MultiPolygonOptions to a PolyhedralSurfacemultiPolygonOptions - hasZ - hasM - public GoogleMapShape toShape(Geometry geometry)
Geometry to a Map shapegeometry - public List<GoogleMapShape> toShapes(GeometryCollection<Geometry> geometryCollection)
GeometryCollection to a list of Map shapesgeometryCollection - public GoogleMapShape addToMap(GoogleMap map, Geometry geometry)
Geometry to a Map shape and add itmap - geometry - public static GoogleMapShape addShapeToMap(GoogleMap map, GoogleMapShape shape)
map - shape - public static Marker addLatLngToMap(GoogleMap map,
LatLng latLng)
map - latLng - public static Marker addMarkerOptionsToMap(GoogleMap map,
MarkerOptions options)
map - options - public static Marker addLatLngToMap(GoogleMap map,
LatLng latLng,
MarkerOptions options)
map - latLng - options - public static Polyline addPolylineToMap(GoogleMap map,
PolylineOptions polyline)
map - polyline - public static com.google.android.gms.maps.model.Polygon addPolygonToMap(GoogleMap map,
PolygonOptions polygon)
map - polygon - public static MultiMarker addLatLngsToMap(GoogleMap map, MultiLatLng latLngs)
map - latLngs - public static MultiPolyline addPolylinesToMap(GoogleMap map, MultiPolylineOptions polylines)
map - polylines - public static MultiPolygon addPolygonsToMap(GoogleMap map, MultiPolygonOptions polygons)
map - polygons - public List<GoogleMapShape> addToMap(GoogleMap map, GeometryCollection<Geometry> geometryCollection)
GeometryCollection to a list of Map shapes and add to
the mapmap - geometryCollection - public GoogleMapShapeMarkers addShapeToMapAsMarkers(GoogleMap map, GoogleMapShape shape, MarkerOptions markerOptions, MarkerOptions polylineMarkerOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolylineOptions globalPolylineOptions, PolygonOptions globalPolygonOptions)
map - shape - markerOptions - polylineMarkerOptions - polygonMarkerOptions - polygonMarkerHoleOptions - globalPolylineOptions - globalPolygonOptions - public List<Marker> addPointsToMapAsMarkers(GoogleMap map, List<LatLng> points, MarkerOptions customMarkerOptions, boolean ignoreIdenticalEnds)
map - points - customMarkerOptions - ignoreIdenticalEnds - public PolylineMarkers addPolylineToMapAsMarkers(GoogleMap map, PolylineOptions polylineOptions, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)
map - polylineOptions - polylineMarkerOptions - globalPolylineOptions - public PolygonMarkers addPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, PolygonOptions polygonOptions, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)
shapeMarkers - map - polygonOptions - polygonMarkerOptions - polygonMarkerHoleOptions - globalPolygonOptions - public MultiPolylineMarkers addMultiPolylineToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolylineOptions multiPolyline, MarkerOptions polylineMarkerOptions, PolylineOptions globalPolylineOptions)
shapeMarkers - map - multiPolyline - polylineMarkerOptions - globalPolylineOptions - public MultiPolygonMarkers addMultiPolygonToMapAsMarkers(GoogleMapShapeMarkers shapeMarkers, GoogleMap map, MultiPolygonOptions multiPolygon, MarkerOptions polygonMarkerOptions, MarkerOptions polygonMarkerHoleOptions, PolygonOptions globalPolygonOptions)
shapeMarkers - map - multiPolygon - polygonMarkerOptions - polygonMarkerHoleOptions - globalPolygonOptions - public List<LatLng> getPointsFromMarkers(List<Marker> markers)
markers - public Geometry toGeometry(GoogleMapShape shape)
shape -