public class OfflineGeometryRegionDefinition extends Object implements OfflineRegionDefinition
Both minZoom and maxZoom must be ≥ 0, and maxZoom must be ≥ minZoom.
maxZoom may be ∞, in which case for each tile source, the region will include tiles from minZoom up to the maximum zoom level provided by that source.
pixelRatio must be ≥ 0 and should typically be 1.0 or 2.0.
Modifier and Type | Field and Description |
---|---|
static Creator |
CREATOR |
Constructor and Description |
---|
OfflineGeometryRegionDefinition(Parcel parcel)
Constructor to create an OfflineGeometryRegionDefinition from a Parcel.
|
OfflineGeometryRegionDefinition(String styleURL,
Geometry geometry,
double minZoom,
double maxZoom,
float pixelRatio)
Constructor to create an OfflineGeometryRegionDefinition from parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
LatLngBounds |
getBounds()
Calculates the bounding box for the Geometry it contains
to retain backwards compatibility
|
Geometry |
getGeometry() |
double |
getMaxZoom() |
double |
getMinZoom() |
float |
getPixelRatio() |
String |
getStyleURL() |
void |
writeToParcel(Parcel dest,
int flags) |
public OfflineGeometryRegionDefinition(String styleURL, Geometry geometry, double minZoom, double maxZoom, float pixelRatio)
styleURL
- the stylegeometry
- the geometryminZoom
- min zoommaxZoom
- max zoompixelRatio
- pixel ratio of the devicepublic OfflineGeometryRegionDefinition(Parcel parcel)
parcel
- the parcel to create the OfflineGeometryRegionDefinition frompublic String getStyleURL()
public Geometry getGeometry()
public LatLngBounds getBounds()
getBounds
in interface OfflineRegionDefinition
LatLngBounds
or nullpublic double getMinZoom()
public double getMaxZoom()
public float getPixelRatio()
public int describeContents()
public void writeToParcel(Parcel dest, int flags)
© 2015–2018 Mapbox. All rights reserved.