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.
if includeIdeographs is false, offline region will not include CJK glyphs
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
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.
|
OfflineGeometryRegionDefinition(String styleURL,
Geometry geometry,
double minZoom,
double maxZoom,
float pixelRatio,
boolean includeIdeographs)
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() |
boolean |
getIncludeIdeographs()
Specifies whether to include ideographic glyphs in downloaded font data.
|
double |
getMaxZoom()
Gets the maximum zoom level the OfflineRegion map can be displayed at.
|
double |
getMinZoom()
Gets the minimum zoom level the OfflineRegion map can be displayed at.
|
float |
getPixelRatio()
Gets the pixel ratio of the OfflineRegion map.
|
String |
getStyleURL()
Returns the map style url of the OfflineRegion.
|
String |
getType()
Gets the type of the OfflineRegionDefinition for telemetry ("tileregion", "shaperegion").
|
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator CREATOR
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(String styleURL, Geometry geometry, double minZoom, double maxZoom, float pixelRatio, boolean includeIdeographs)
styleURL
- the stylegeometry
- the geometryminZoom
- min zoommaxZoom
- max zoompixelRatio
- pixel ratio of the deviceincludeIdeographs
- include glyphs for CJK languagespublic OfflineGeometryRegionDefinition(Parcel parcel)
parcel
- the parcel to create the OfflineGeometryRegionDefinition frompublic String getStyleURL()
OfflineRegionDefinition
getStyleURL
in interface OfflineRegionDefinition
public Geometry getGeometry()
public LatLngBounds getBounds()
getBounds
in interface OfflineRegionDefinition
LatLngBounds
or nullpublic double getMinZoom()
OfflineRegionDefinition
getMinZoom
in interface OfflineRegionDefinition
public double getMaxZoom()
OfflineRegionDefinition
getMaxZoom
in interface OfflineRegionDefinition
public float getPixelRatio()
OfflineRegionDefinition
getPixelRatio
in interface OfflineRegionDefinition
public boolean getIncludeIdeographs()
OfflineRegionDefinition
getIncludeIdeographs
in interface OfflineRegionDefinition
MapboxMapOptions.localIdeographFontFamily(String)
public String getType()
OfflineRegionDefinition
getType
in interface OfflineRegionDefinition
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable
© 2015–2019 Mapbox. All rights reserved.