On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

ConsumerMapStyle

Stay organized with collections Save and categorize content based on your preferences.
public interface ConsumerMapStyle

Contains the methods for customizing the style of UI elements managed by the ConsumerMapFragment.

Public Method Summary

abstract MarkerOptions
getMarkerStyleOptions(int type)
Returns the style attributes for a type of marker.
abstract PolylineOptions
getPolylineStyleOptions(int type)
Returns the style options for a type of polyline.
abstract TrafficStyle
getPolylineTrafficStyle(int type)
Returns the traffic style for a type of polyline.
abstract void
setMarkerStyleOptions(int type, MarkerOptions markerOptions)
Sets the style attributes for a type of marker.
abstract void
setPolylineStyleOptions(int type, PolylineOptions polylineOptions)
Sets the style options for a type of polyline.
abstract void
setPolylineTrafficStyle(int type, TrafficStyle trafficStyle)
Sets the traffic style for a type of polyline.

Public Methods

public abstract MarkerOptions getMarkerStyleOptions (int type)

Returns the style attributes for a type of marker. The returned markerOptions will either be the style set in setMarkerStyleOptions(int, MarkerOptions), or the SDK-set default style if none set.

Returns null if the supplied marker type is invalid.

Parameters
type the marker type.
Returns
  • the style for the supplied marker type, or null if the type is invalid.

public abstract PolylineOptions getPolylineStyleOptions (int type)

Returns the style options for a type of polyline. Returns null if the supplied polyline type is invalid. Returns the SDK-set default style if no custom style has been set.

Parameters
type the polyline type.
Returns
  • the PolylineOptions for the supplied polyline type, or null if the type is invalid.

public abstract TrafficStyle getPolylineTrafficStyle (int type)

Returns the traffic style for a type of polyline. Returns null if the supplied polyline type is invalid.

Parameters
type the polyline type.
Returns
  • the PolylineOptions for the supplied polyline type, or null if the type is invalid.

public abstract void setMarkerStyleOptions (int type, MarkerOptions markerOptions)

Sets the style attributes for a type of marker. If the markerOptions argument is null, the style will revert to the default attributes for the given marker type. It is recommended to set the MarkerOptions.flat(boolean) property to false for vehicle markers, and true for pickup, dropoff, and intermediate destination markers.

Parameters
type the marker type
markerOptions the style attributes for the supplied marker type
Throws
IllegalArgumentException if marker position or rotation is set, or if draggable is set to true for the vehicle marker.

public abstract void setPolylineStyleOptions (int type, PolylineOptions polylineOptions)

Sets the style options for a type of polyline. If polylineOptions is null, it will be replaced by the SDK-default polyline options for the given polyline type.

Parameters
type the polyline type.
polylineOptions the polyline style options.
Throws
IllegalArgumentException if the polyline points are set. Polyline points may only be set by the SDK.

public abstract void setPolylineTrafficStyle (int type, TrafficStyle trafficStyle)

Sets the traffic style for a type of polyline. If trafficStyle is null, it will be replaced by the SDK-default traffic style for the given polyline type.

Parameters
type the polyline type.
trafficStyle the traffic style options.