Tile
Stay organized with collections
Save and categorize content based on your preferences.
Contains information about a Tile that is returned by a TileProvider
.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Field Summary
public final byte[] |
data
|
A byte array containing the image data. |
public final int |
height
|
The height of the image encoded by data
in pixels. |
public final int |
width
|
The width of the image encoded by data
in pixels. |
Public Constructor Summary
Tile
(int width, int height, byte[] data)
Inherited Method Summary
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Fields
public final int
height
The height of the image encoded by data
in pixels.
public final int
width
The width of the image encoded by data
in pixels.
Public Constructors
public
Tile
(int width, int height, byte[]
data)
Public Methods
public void
writeToParcel
( Parcel
out, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eTile\u003c/code\u003e class holds information about a map tile, including its width, height, and image data.\u003c/p\u003e\n"],["\u003cp\u003eTile data is stored as a byte array and is used to create the tile image.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a \u003ccode\u003eTile\u003c/code\u003e object by specifying its width, height, and image data.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTile\u003c/code\u003e objects are Parcelable, meaning they can be easily passed between components.\u003c/p\u003e\n"]]],[],null,["# Tile\n\npublic final class **Tile** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nContains information about a Tile that is returned by a [TileProvider](/android/reference/com/google/android/gms/maps/model/TileProvider). \n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Field Summary\n\n|-----------------------|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| public final byte\\[\\] | [data](/android/reference/com/google/android/gms/maps/model/Tile#data) | A byte array containing the image data. |\n| public final int | [height](/android/reference/com/google/android/gms/maps/model/Tile#height) | The height of the image encoded by [data](/android/reference/com/google/android/gms/maps/model/Tile#data) in pixels. |\n| public final int | [width](/android/reference/com/google/android/gms/maps/model/Tile#width) | The width of the image encoded by [data](/android/reference/com/google/android/gms/maps/model/Tile#data) in pixels. |\n\n### Public Constructor Summary\n\n|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Tile](/android/reference/com/google/android/gms/maps/model/Tile#Tile(int,%20int,%20byte[]))(int width, int height, byte\\[\\] data) Constructs a [Tile](/android/reference/com/google/android/gms/maps/model/Tile). |\n\n### Public Method Summary\n\n|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void | [writeToParcel](/android/reference/com/google/android/gms/maps/model/Tile#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nFields\n------\n\n#### public final byte\\[\\]\n**data**\n\nA byte array containing the image data. The image will be created from this data by\ncalling [BitmapFactory.decodeByteArray(byte[], int, int)](//developer.android.com/reference/android/graphics/BitmapFactory.html#decodeByteArray(byte[],%20int,%20int)). Other than in the case of\n[TileProvider.NO_TILE](/android/reference/com/google/android/gms/maps/model/TileProvider#NO_TILE),\n`data` should never be `null`. \n\n#### public final int\n**height**\n\nThe height of the image encoded by [data](/android/reference/com/google/android/gms/maps/model/Tile#data)\nin pixels. \n\n#### public final int\n**width**\n\nThe width of the image encoded by [data](/android/reference/com/google/android/gms/maps/model/Tile#data)\nin pixels.\n\nPublic Constructors\n-------------------\n\n#### public **Tile** (int width, int height, byte\\[\\] data)\n\nConstructs a [Tile](/android/reference/com/google/android/gms/maps/model/Tile). \n\n##### Parameters\n\n| width | the width of the image in pixels |\n| height | the height of the image in pixels |\n| data | A byte array containing the image data. The image will be created from this data by calling [BitmapFactory.decodeByteArray(byte[], int, int)](//developer.android.com/reference/android/graphics/BitmapFactory.html#decodeByteArray(byte[],%20int,%20int)). Except for [TileProvider.NO_TILE](/android/reference/com/google/android/gms/maps/model/TileProvider#NO_TILE), `data` should never be `null`. |\n|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\nPublic Methods\n--------------\n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags)"]]