MapsforgeSettingsMgr class

Singleton settings manager for Mapsforge rendering configuration.

This class manages global settings that affect map rendering behavior, including tile sizes, scaling factors, stroke properties, and text rendering. Uses the singleton pattern to ensure consistent settings across the application.

Key configuration areas:

  • Tile rendering (size, scale factors)
  • Stroke rendering (thickness, zoom-dependent scaling)
  • Font and text rendering (scale factors, maximum widths)
  • Device-specific adaptations (DPI scaling)

Constructors

MapsforgeSettingsMgr()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
maxTextWidth double
getter/setter pair
maxTextWidthFactor double
Maximum text width factor relative to tile size.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
strokeIncreaseFactor double
no getter
strokeMaxScaleFactor double
no getter
strokeMinZoomlevel int
Minimum zoom level at which stroke thickening begins. Below this level, strokes maintain their base thickness.
getter/setter pair
strokeMinZoomlevelText int
Minimum zoom level at which text stroke thickening begins. Text strokes start scaling at higher zoom levels than regular strokes.
getter/setter pair
tileSize double
The size of a tile in pixels. Default is 256 pixels.
getter/setter pair

Methods

calculateScaleFactor(int zoomlevel, int minZoomlevel) double
Calculates zoom-dependent scale factor for rendering elements.
getDeviceScaleFactor() double
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
getUserScaleFactor() double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDeviceScaleFactor(double deviceScaleFactor) → void
setFontScaleFactor(double fontScaleFactor) → void
setUserScaleFactor(double userScaleFactor) → void
toString() String
A string representation of this object.
inherited

Operators

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

Constants

defaultMaxZoomlevel → const int
Default maximum zoom level supported by the rendering system. Can be overridden by specific map implementations.