public static class StaticMarkerAnnotation.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
StaticMarkerAnnotation |
build() |
String |
getColor()
A 3- or 6-digit hexadecimal color code represented as a String.
|
String |
getLabel()
StaticMarkerAnnotation symbol.
|
Double |
getLat()
Latitude for the center point of the static map.
|
Double |
getLon()
Longitude for the center point of the static map.
|
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.
|
String |
getUrl()
The URL for the your custom marker icon.
|
StaticMarkerAnnotation.Builder |
setColor(String color)
A 3- or 6-digit hexadecimal color code represented as a String.
|
StaticMarkerAnnotation.Builder |
setLabel(String label)
StaticMarkerAnnotation symbol.
|
StaticMarkerAnnotation.Builder |
setLat(Double lat)
Latitude for the center point of the static map.
|
StaticMarkerAnnotation.Builder |
setLon(Double lon)
Longitude for the center point of the static map.
|
StaticMarkerAnnotation.Builder |
setName(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(String url)
The URL for the your custom marker icon.
|
public String getUrl()
public StaticMarkerAnnotation.Builder setUrl(String url)
PNG
or JPG
.url
- The direct url to your image that will be used for the marker icon.public String getName()
public StaticMarkerAnnotation.Builder setName(String name)
Constants.PIN_SMALL
, Constants.PIN_MEDIUM
, or
Constants.PIN_SMALL
.name
- String containing the shape and sizepublic 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(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 String getColor()
public StaticMarkerAnnotation.Builder setColor(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 Double getLat()
public StaticMarkerAnnotation.Builder setLat(Double lat)
lat
- double number between -90 and 90.public Double getLon()
public StaticMarkerAnnotation.Builder setLon(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
© 2015–2016 Mapbox. All rights reserved.