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, double deviceScaleFactor = 1.0, double userScaleFactor = 1.0, double maxTextWidthFactor = 0.7, double fontScaleFactor = 1.0, int backgroundColor = 0xffeeeeee})

Properties

backgroundColor int
getter/setter pair
DEFAULT_INDOOR_LEVEL int
getter/setter pair
DEFAULT_ROTATION double
getter/setter pair
DEFAULT_ZOOM int
getter/setter pair
deviceScaleFactor double
Device scale factor. The bigger that value the larger the size of the tiles and hence the map. In ViewModel the map will be shrinked again by the same factor so that the size stays the same but the quality of the image increases.
final
filter ↔ Filter
getter/setter pair
fontScaleFactor double
sets the scale factor for fonts and symbols. The size of a font or symbol is dependent on the renderertheme, and this property.
final
hashCode int
The hash code for this object.
no setterinherited
maxTextWidth double
getter/setter pair
maxTextWidthFactor double
final
maxZoomLevel int
maximum zoomlevel
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tileSize int
The size of a tile in mappixel. The default is 256, but if deviceScaleFactor or userScaleFactor is not 1 the tileSize will be stretched accordingly.
getter/setter pair
userScaleFactor double
scale factor requested by the user. The bigger that value the larger the size of the tiles. That also means that the map shows more details at a certain zoomLevel.
final

Methods

getBackgroundColor() int
Returns the background color.
getDeviceScaleFactor() double
Returns the device scale factor.
getFilter() → Filter
Color filtering in map rendering.
getFontScaleFactor() double
Returns the scale factor for font-related items
getMaxTextWidth() double
Returns the maximum width of text beyond which the text is broken into lines. This should be used in the graphicsFactory but is currently not used at all
getScaleFactor() double
Returns the overall scale factor for non-font related items.
getTileSize() int
Width and height of a map tile in pixel after system and user scaling is applied.
getUserScaleFactor() double
Returns the user scale factor.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setBackgroundColor(int color) → void
Set the background color.
setFilter(Filter filter) → void
Color filtering in map rendering.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

DEFAULT_TILE_SIZE → const int
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.
STROKE_MIN_ZOOMLEVEL → const int
start to thicken the strokes at this zoomlevel
STROKE_MIN_ZOOMLEVEL_TEXT → const int
start to thicken the strokes of texts at this zoomlevel