public abstract static class StaticMarkerAnnotation.Builder
extends java.lang.Object
lnglat(Point)
.
All other fields can be left alone inorder to use the default behaviour of the API.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
StaticMarkerAnnotation |
build()
Build a new marker instance and pass it into
MapboxStaticMap in order to use it during your Static Map
API request. |
StaticMarkerAnnotation.Builder |
color(int red,
int green,
int blue)
A hex representation of the markers color.
|
abstract StaticMarkerAnnotation.Builder |
color(java.lang.String color)
A hex representation of the markers color.
|
abstract StaticMarkerAnnotation.Builder |
iconUrl(java.lang.String url)
a percent-encoded URL for the marker image.
|
abstract StaticMarkerAnnotation.Builder |
label(java.lang.String label)
Marker symbol.
|
abstract StaticMarkerAnnotation.Builder |
lnglat(com.mapbox.geojson.Point lnglat)
Represents where the marker should be shown on the map.
|
abstract StaticMarkerAnnotation.Builder |
name(java.lang.String name)
Modify the markers scale factor using one of the pre defined
StaticMapCriteria.SMALL_PIN , StaticMapCriteria.MEDIUM_PIN , or
StaticMapCriteria.LARGE_PIN . |
public abstract StaticMarkerAnnotation.Builder name(java.lang.String name)
StaticMapCriteria.SMALL_PIN
, StaticMapCriteria.MEDIUM_PIN
, or
StaticMapCriteria.LARGE_PIN
.name
- one of the three string sizes provided in this methods summarypublic abstract StaticMarkerAnnotation.Builder label(java.lang.String label)
label
- a valid alphanumeric valuepublic abstract StaticMarkerAnnotation.Builder color(@Nullable java.lang.String color)
color
- hex reppresentation of the marker icon colorpublic StaticMarkerAnnotation.Builder color(int red, int green, int blue)
red
- the value of the marker icon colorgreen
- the value of the marker icon colorblue
- the value of the marker icon colorpublic abstract StaticMarkerAnnotation.Builder lnglat(com.mapbox.geojson.Point lnglat)
lnglat
- a GeoJSON Point which denotes where the marker will be placed on the static
map image. Altitude value, if given, will be ignoredpublic abstract StaticMarkerAnnotation.Builder iconUrl(@Nullable java.lang.String url)
url
- an encoded URL for the marker imagepublic StaticMarkerAnnotation build()
MapboxStaticMap
in order to use it during your Static Map
API request.StaticMarkerAnnotation