public static class StaticMarkerAnnotation.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
StaticMarkerAnnotation |
build() |
java.lang.String |
getColor()
A 3- or 6-digit hexadecimal color code represented as a String.
|
java.lang.String |
getLabel()
StaticMarkerAnnotation symbol.
|
java.lang.Double |
getLat()
Latitude for the center point of the static map.
|
java.lang.Double |
getLon()
Longitude for the center point of the static map.
|
java.lang.String |
getName()
The markers shape and size which can only be one of the three constants.
|
com.mapbox.services.commons.models.Position |
getPosition()
Get the markers latitude and longitude coordinate as a
Position object. |
int |
getPrecision()
The precision value being used for the coordinates.
|
java.lang.String |
getUrl()
The URL for the your custom marker icon.
|
StaticMarkerAnnotation.Builder |
setColor(java.lang.String color)
A 3- or 6-digit hexadecimal color code represented as a String.
|
StaticMarkerAnnotation.Builder |
setLabel(java.lang.String label)
StaticMarkerAnnotation symbol.
|
StaticMarkerAnnotation.Builder |
setLat(java.lang.Double lat)
Latitude for the center point of the static map.
|
StaticMarkerAnnotation.Builder |
setLon(java.lang.Double lon)
Longitude for the center point of the static map.
|
StaticMarkerAnnotation.Builder |
setName(java.lang.String name)
StaticMarkerAnnotation shape and size.
|
StaticMarkerAnnotation.Builder |
setPosition(com.mapbox.services.commons.models.Position position)
Optionally pass in a
Position object containing the latitude and longitude coordinates you'd like your
marker to be placed. |
StaticMarkerAnnotation.Builder |
setPrecision(int precision)
In order to make the returned images better cacheable on the client, you can set the
precision in decimals instead of manually rounding the parameters.
|
StaticMarkerAnnotation.Builder |
setUrl(java.lang.String url)
The URL for the your custom marker icon.
|
public java.lang.String getUrl()
public StaticMarkerAnnotation.Builder setUrl(java.lang.String url)
PNG or JPG.url - The direct url to your image that will be used for the marker icon.public java.lang.String getName()
public StaticMarkerAnnotation.Builder setName(java.lang.String name)
Constants.PIN_SMALL, Constants.PIN_MEDIUM, or
Constants.PIN_SMALL.name - String containing the shape and sizepublic java.lang.String getLabel()
a through z, 0 through
99, or a valid Mapbox Maki icon. If a letter is requested, it will be rendered uppercase only.public StaticMarkerAnnotation.Builder setLabel(java.lang.String label)
a-A through
z-Z, 0 through 99, or a valid Maki icon. If a letter is requested, it will be
rendered uppercase only.label - String containing the marker symbol.public java.lang.String getColor()
public StaticMarkerAnnotation.Builder setColor(java.lang.String color)
ServicesException will occur.color - String containing the color.public com.mapbox.services.commons.models.Position getPosition()
Position object.Position object representing where the marker will be placed on the static image.public StaticMarkerAnnotation.Builder setPosition(com.mapbox.services.commons.models.Position position)
Position object containing the latitude and longitude coordinates you'd like your
marker to be placed.position - A Position object.public java.lang.Double getLat()
public StaticMarkerAnnotation.Builder setLat(java.lang.Double lat)
lat - double number between -90 and 90.public java.lang.Double getLon()
public StaticMarkerAnnotation.Builder setLon(java.lang.Double lon)
lon - double number between -180 and 180.public StaticMarkerAnnotation.Builder setPrecision(int precision)
precision - int number representing the precision for the formatterpublic int getPrecision()
public StaticMarkerAnnotation build() throws ServicesException
ServicesException