Package com.mapbox.mapboxsdk.attribution
Contains the Mapbox Maps Android Attribution API classes.
Types
Name | Summary |
---|---|
Attribution | open class Attribution |
AttributionLayout | open class AttributionLayout |
AttributionMeasure | open class AttributionMeasure |
AttributionParser | open class AttributionParser Responsible for parsing attribution data coming from Sources and MapSnapshot. |
Attribution
open class Attribution
Constructors
Name | Summary |
---|---|
Attribution | open fun Attribution(title: String, url: String) |
Functions
Name | Summary |
---|---|
equals | open fun equals(o: Any): Boolean |
getTitleAbbreviated | open fun getTitleAbbreviated(): String |
hashCode | open fun hashCode(): Int |
Properties
Name | Summary |
---|---|
IMPROVE_MAP_URLS | val IMPROVE_MAP_URLS: List |
MAPBOX_URL | val MAPBOX_URL: String |
title | private open val title: String |
url | private open val url: String |
IMPROVE_MAP_URLS
val IMPROVE_MAP_URLS: List
MAPBOX_URL
val MAPBOX_URL: String
equals
open fun equals(o: Any): Boolean
getTitleAbbreviated
open fun getTitleAbbreviated(): String
hashCode
open fun hashCode(): Int
title
private open val title: String
url
private open val url: String
AttributionLayout
open class AttributionLayout
Constructors
Name | Summary |
---|---|
AttributionLayout | open fun AttributionLayout(logo: Bitmap, anchorPoint: PointF, shortText: Boolean) |
Functions
Name | Summary |
---|---|
equals | open fun equals(o: Any): Boolean |
hashCode | open fun hashCode(): Int |
isShortText | open fun isShortText(): Boolean |
toString | @NonNull() open fun toString(): String |
Properties
Name | Summary |
---|---|
anchorPoint | @Nullable() private open val anchorPoint: PointF |
logo | @Nullable() private open val logo: Bitmap |
anchorPoint
@Nullable()
private open val anchorPoint: PointF
equals
open fun equals(o: Any): Boolean
hashCode
open fun hashCode(): Int
isShortText
open fun isShortText(): Boolean
logo
@Nullable()
private open val logo: Bitmap
toString
@NonNull()
open fun toString(): String
AttributionMeasure
open class AttributionMeasure
Constructors
Name | Summary |
---|---|
AttributionMeasure | open fun AttributionMeasure(snapshot: Bitmap, logo: Bitmap, logoSmall: Bitmap, tv: TextView, tvShort: TextView, margin: Float) |
Types
Name | Summary |
---|---|
Builder | open class Builder |
Command | interface Command |
Functions
Name | Summary |
---|---|
measure | @Nullable() open fun measure(): AttributionLayout |
Properties
Name | Summary |
---|---|
textView | private open val textView: TextView |
measure
@Nullable()
open fun measure(): AttributionLayout
textView
private open val textView: TextView
Builder
open class Builder
Functions
Name | Summary |
---|---|
build | @NonNull() open fun build(): AttributionMeasure |
Properties
Name | Summary |
---|---|
logo | private open var logo: Bitmap |
logoSmall | private open var logoSmall: Bitmap |
marginPadding | private open var marginPadding: Float |
snapshot | private open var snapshot: Bitmap |
textView | private open var textView: TextView |
textViewShort | private open var textViewShort: TextView |
build
@NonNull()
open fun build(): AttributionMeasure
logoSmall
private open var logoSmall: Bitmap
logo
private open var logo: Bitmap
marginPadding
private open var marginPadding: Float
snapshot
private open var snapshot: Bitmap
textViewShort
private open var textViewShort: TextView
textView
private open var textView: TextView
Command
interface Command
Functions
Name | Summary |
---|---|
execute | @Nullable() abstract fun execute(measure: AttributionMeasure): AttributionLayout |
execute
@Nullable()
abstract fun execute(measure: AttributionMeasure): AttributionLayout
AttributionParser
open class AttributionParser
Responsible for parsing attribution data coming from Sources and MapSnapshot.
Exposes multiple configuration options to manipulate data being parsed. Use the Options object to build these configurations.
Constructors
Name | Summary |
---|---|
AttributionParser | open fun AttributionParser(context: WeakReference |
Types
Name | Summary |
---|---|
Options | open class Options Builder to configure using an AttributionParser. |
Functions
Name | Summary |
---|---|
createAttributionString | @NonNull() open fun createAttributionString(): String @NonNull() open fun createAttributionString(shortenedOutput: Boolean): String Get parsed attribution string. |
Properties
Name | Summary |
---|---|
attributions | private val attributions: Set<Attribution> |
attributions
private val attributions: Set<Attribution>
createAttributionString
@NonNull()
open fun createAttributionString(): String
Get parsed attribution string.
Return
the parsed attribution string
@NonNull()
open fun createAttributionString(shortenedOutput: Boolean): String
Get parsed attribution string.
Return
the parsed attribution string
Parameters
Name | Summary |
---|---|
shortenedOutput | if attribution string should contain shortened output |
Options
open class Options
Builder to configure using an AttributionParser.
AttributionData, set with withAttributionData, is the only required property to buildthe underlying AttributionParser. Other properties include trimming the copyright sign, hidingattribution as improve this map and Mapbox.
Constructors
Name | Summary |
---|---|
Options | open fun Options(context: Context) |
Functions
Name | Summary |
---|---|
build | @NonNull() open fun build(): AttributionParser |
withAttributionData | @NonNull() open fun withAttributionData(attributionData: Array |
withCopyrightSign | @NonNull() open fun withCopyrightSign(withCopyrightSign: Boolean): AttributionParser.Options |
withImproveMap | @NonNull() open fun withImproveMap(withImproveMap: Boolean): AttributionParser.Options |
withMapboxAttribution | @NonNull() open fun withMapboxAttribution(withMapboxAttribution: Boolean): AttributionParser.Options |
build
@NonNull()
open fun build(): AttributionParser
withAttributionData
@NonNull()
open fun withAttributionData(attributionData: Array
withCopyrightSign
@NonNull()
open fun withCopyrightSign(withCopyrightSign: Boolean): AttributionParser.Options
withImproveMap
@NonNull()
open fun withImproveMap(withImproveMap: Boolean): AttributionParser.Options
withMapboxAttribution
@NonNull()
open fun withMapboxAttribution(withMapboxAttribution: Boolean): AttributionParser.Options
Android SDK
SDK JS Reference
- Root
- attribution
- camera
- constants
- exceptions
- geometry
- http
- location
- location.engine
- location.modes
- location.permissions
- log
- maps
- maps.renderer
- maps.renderer.egl
- maps.renderer.glsurfaceview
- maps.renderer.textureview
- maps.widgets
- module.http
- module.loader
- net
- offline
- snapshotter
- storage
- style.expressions
- style.layers
- style.light
- style.sources
- style.types
- text
- utils