preferences property

MapViewPreferences get preferences

Retrieves the map view's customization preferences.

Returns a MapViewPreferences object that provides comprehensive control over map appearance and behavior. Through this object, you can customize visible map elements, styling, colors, line widths, landmark display settings, and many other visual aspects of the map view.

Allows the display of various elements such as Landmark, Route, Marker, OverlayItem, Path via the specialized collections and settings.

Changes made to the preferences object immediately affect the map view's rendering and behavior.

See also:

Implementation

MapViewPreferences get preferences {
  if (_preferences == null) {
    final OperationResult resultString = objectMethod(
      _pointerId,
      'MapView',
      'preferences',
    );

    _preferences = MapViewPreferences.init(
      resultString['result'],
      _mapId,
      _pointerId,
    );
    return _preferences!;
  }
  return _preferences!;
}