public class ImageSource extends Source
The georeferenced image scales and rotates as the user zooms and rotates the map. The geographic location of the raster image content, supplied with `LatLngQuad`, can be non-axis aligned.
* @see the style specificationConstructor and Description |
---|
ImageSource(java.lang.String id,
LatLngQuad coordinates,
android.graphics.Bitmap bitmap)
Create an ImageSource from coordinates and a bitmap image
|
ImageSource(java.lang.String id,
LatLngQuad coordinates,
java.net.URL url)
Create an ImageSource from coordinates and an image URL
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
java.lang.String |
getUrl() |
protected void |
initialize(java.lang.String layerId,
LatLngQuad payload) |
protected java.lang.String |
nativeGetUrl() |
protected void |
nativeSetCoordinates(LatLngQuad latLngQuad) |
protected void |
nativeSetImage(Bitmap bitmap) |
protected void |
nativeSetUrl(java.lang.String url) |
void |
setCoordinates(LatLngQuad latLngQuad)
Updates the latitude and longitude of the four corners of the image
|
void |
setImage(android.graphics.Bitmap bitmap)
Updates the source image to a bitmap
|
void |
setUrl(java.lang.String url)
Updates the source image url
|
void |
setUrl(java.net.URL url)
Updates the source image url
|
checkThread, getAttribution, getId, getNativePtr, nativeGetAttribution, nativeGetId, setDetached
public ImageSource(java.lang.String id, LatLngQuad coordinates, java.net.URL url)
id
- The source idcoordinates
- The Latitude and Longitude of the four corners of the imageurl
- remote json filepublic ImageSource(java.lang.String id, LatLngQuad coordinates, android.graphics.Bitmap bitmap)
id
- The source idcoordinates
- The Latitude and Longitude of the four corners of the imagebitmap
- A Bitmap imagepublic void setUrl(java.net.URL url)
url
- An Image urlpublic void setUrl(java.lang.String url)
url
- An image urlpublic void setImage(android.graphics.Bitmap bitmap)
bitmap
- A Bitmap imagepublic java.lang.String getUrl()
public void setCoordinates(LatLngQuad latLngQuad)
latLngQuad
- latitude and longitude of the four corners of the imageprotected void initialize(java.lang.String layerId, LatLngQuad payload)
protected void nativeSetUrl(java.lang.String url)
protected java.lang.String nativeGetUrl()
protected void nativeSetImage(Bitmap bitmap)
protected void nativeSetCoordinates(LatLngQuad latLngQuad)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
© 2015–2019 Mapbox. All rights reserved.