DisplayModel class

Encapsulates the display characteristics for a MapView, such as tile size and background color. The size of map tiles is used to adapt to devices with differing pixel densities and users with different preferences: The larger the tile, the larger everything is rendered, the effect is one of effectively stretching everything. The default device dependent scale factor is determined at the GraphicFactory level, while the DisplayModel allows further adaptation to cater for user needs or application development (maybe a small map and large map, or to prevent upscaling for downloaded tiles that do not scale well).

Constructors

DisplayModel({int maxZoomLevel = 25})

Properties

backgroundColor int
read / write
DEFAULT_INDOOR_LEVEL int
final
DEFAULT_ZOOM int
final
filter ↔ Filter
read / write
fixedTileSize double
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
maxTextWidth int
read / write
maxTextWidthFactor double
read / write
maxZoomLevel int
maximum zoomlevel
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
tileSize double
read / write
tileSizeMultiple double
read / write
userScaleFactor double
read / write

Methods

getBackgroundColor() int
Returns the background color. [...]
getFilter() → Filter
Color filtering in map rendering.
getMaxTextWidth() int
Returns the maximum width of text beyond which the text is broken into lines. [...]
getScaleFactor() double
Returns the overall scale factor. [...]
getTileSize() double
Width and height of a map tile in pixel after system and user scaling is applied.
getTileSizeMultiple() double
Gets the tile size multiple.
getUserScaleFactor() double
Returns the user scale factor. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
setBackgroundColor(int color) → void
Set the background color. [...]
setFilter(Filter filter) → void
Color filtering in map rendering.
setFixedTileSize(double tileSize) → void
Forces the tile size to a fixed value [...]
setMaxTextWidth() → void
setMaxTextWidthFactor(double maxTextWidthFactor) → void
Sets the factor to compute the maxTextWidth [...]
setTileSizeMultiple(double multiple) → void
Clamps the tile size to a multiple of the supplied value. [...]
setUserScaleFactor(double scaleFactor) → void
Set the user scale factor. [...]
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

DEFAULT_BACKGROUND_COLOR int
final
DEFAULT_MAX_TEXT_WIDTH int
final
DEFAULT_MAX_TEXT_WIDTH_FACTOR double
final
DEFAULT_TILE_SIZE double
the tile size. At zoomLevel 0 the whole world fits onto 1 tile, zoomLevel 1 needs 4 tiles to fit on it and so on.
final
defaultUserScaleFactor double
read / write
deviceScaleFactor double
read / write

Static Methods

getDefaultUserScaleFactor() double
Get the default scale factor for all newly created DisplayModels. [...]
getDeviceScaleFactor() double
Returns the device scale factor. [...]
setDefaultUserScaleFactor(double scaleFactor) → void
Set the default scale factor for all newly created DisplayModels, so can be used to apply user settings from a device. [...]
setDeviceScaleFactor(double scaleFactor) → void
Set the device scale factor. [...]