public abstract static class NbmapStaticMap.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract NbmapStaticMap.Builder |
accessToken(java.lang.String accessToken)
Required to call when this is being built.
|
abstract NbmapStaticMap.Builder |
attribution(boolean attribution)
Optionally, control whether there is attribution on the image.
|
abstract NbmapStaticMap.Builder |
baseUrl(java.lang.String baseUrl)
Optionally change the APIs base URL to something other then the default Nbmap one.
|
abstract NbmapStaticMap.Builder |
beforeLayer(java.lang.String beforeLayer)
String value for controlling where the overlay is inserted in the style.
|
NbmapStaticMap |
build()
This uses the provided parameters set using the
NbmapStaticMap.Builder and creates a new
NbmapStaticMap object. |
abstract NbmapStaticMap.Builder |
cameraAuto(boolean auto)
If auto is set to true, the viewport will fit the bounds of the overlay.
|
abstract NbmapStaticMap.Builder |
cameraBearing(double cameraBearing)
Optionally, bearing rotates the map around its center defined point given in
cameraPoint(Point). |
abstract NbmapStaticMap.Builder |
cameraPitch(double cameraPitch)
Optionally, pitch tilts the map, producing a perspective effect.
|
abstract NbmapStaticMap.Builder |
cameraPoint(com.nbmap.geojson.Point cameraPoint)
Center point where the camera will be focused on.
|
abstract NbmapStaticMap.Builder |
cameraZoom(double cameraZoom)
Static maps camera zoom level.
|
abstract NbmapStaticMap.Builder |
geoJson(com.nbmap.geojson.GeoJson geoJson)
GeoJSON object which represents a specific annotation which will be placed on the static map.
|
abstract NbmapStaticMap.Builder |
height(int height)
Height of the image.
|
abstract NbmapStaticMap.Builder |
logo(boolean logo)
Optionally, control whether there is a Nbmap logo on the image.
|
abstract NbmapStaticMap.Builder |
precision(int precision)
In order to make the returned image better cache-able on the client, you can set the
precision in decimals instead of manually round the parameters.
|
abstract NbmapStaticMap.Builder |
retina(boolean retina)
Enhance your image by toggling retina to true.
|
abstract NbmapStaticMap.Builder |
staticMarkerAnnotations(java.util.List<StaticMarkerAnnotation> staticMarkerAnnotations)
Optionally provide a list of marker annotations which can be placed on the static map image
during the rendering process.
|
abstract NbmapStaticMap.Builder |
staticPolylineAnnotations(java.util.List<StaticPolylineAnnotation> staticPolylineAnnotations)
Optionally provide a list of polyline annotations which can be placed on the static map image
during the rendering process.
|
abstract NbmapStaticMap.Builder |
styleId(java.lang.String styleId)
The returning map images style, which can be one of the provided Nbmap Styles or a custom
style made inside Nbmap Studio.
|
abstract NbmapStaticMap.Builder |
user(java.lang.String user)
The username for the account that the directions engine runs on.
|
abstract NbmapStaticMap.Builder |
width(int width)
Width of the image.
|
public abstract NbmapStaticMap.Builder accessToken(@NonNull java.lang.String accessToken)
ServicesException will be thrown.accessToken - Nbmap access token, You must have a Nbmap account inorder to use
the Optimization APIpublic abstract NbmapStaticMap.Builder baseUrl(@NonNull java.lang.String baseUrl)
baseUrl - base url used as end pointpublic abstract NbmapStaticMap.Builder user(@NonNull java.lang.String user)
Constants.NBMAP_USER.user - a non-null string which will replace the default user used in the directions
requestpublic abstract NbmapStaticMap.Builder styleId(@NonNull java.lang.String styleId)
styleId - either one of the styles defined inside StaticMapCriteria or a custom
url pointing to a styled map made in Nbmap Studiopublic abstract NbmapStaticMap.Builder logo(boolean logo)
logo - true places Nbmap logo on imagepublic abstract NbmapStaticMap.Builder attribution(boolean attribution)
attribution - true places attribution on imagepublic abstract NbmapStaticMap.Builder retina(boolean retina)
retina - true if the desired image being returned should contain double pixelspublic abstract NbmapStaticMap.Builder cameraPoint(@Nullable com.nbmap.geojson.Point cameraPoint)
cameraPoint - a GeoJSON Point object which defines the cameras center positionpublic abstract NbmapStaticMap.Builder cameraZoom(double cameraZoom)
cameraZoom - double number between 0 and 22public abstract NbmapStaticMap.Builder cameraBearing(double cameraBearing)
cameraPoint(Point). A value of 90 rotates the map 90 to the left. 180 flips the map.
Defaults is 0.cameraBearing - double number between 0 and 360, interpreted as decimal degreespublic abstract NbmapStaticMap.Builder cameraPitch(double cameraPitch)
cameraPitch - double number between 0 and 60public abstract NbmapStaticMap.Builder cameraAuto(boolean auto)
auto - true if you'd like the viewport to be centered to display all map annotations,
defaults falsepublic abstract NbmapStaticMap.Builder beforeLayer(@Nullable java.lang.String beforeLayer)
beforeLayer - s string representing the map layer you'd like to place your overlays
below.public abstract NbmapStaticMap.Builder width(int width)
width - int number between 1 and 1280.public abstract NbmapStaticMap.Builder height(int height)
height - int number between 1 and 1280.public abstract NbmapStaticMap.Builder geoJson(@Nullable com.nbmap.geojson.GeoJson geoJson)
geoJson - a formatted string ready to be added to the static map image URLpublic abstract NbmapStaticMap.Builder staticMarkerAnnotations(@Nullable java.util.List<StaticMarkerAnnotation> staticMarkerAnnotations)
staticMarkerAnnotations - a list made up of StaticMarkerAnnotation objectspublic abstract NbmapStaticMap.Builder staticPolylineAnnotations(@Nullable java.util.List<StaticPolylineAnnotation> staticPolylineAnnotations)
staticPolylineAnnotations - a list made up of StaticPolylineAnnotation objectspublic abstract NbmapStaticMap.Builder precision(int precision)
precision - integer value greater than zero which represents the decimal precision of
coordinate valuespublic NbmapStaticMap build()
NbmapStaticMap.Builder and creates a new
NbmapStaticMap object.NbmapStaticMap