diff --git a/android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt b/android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt index 8615dec9..7e4437e3 100644 --- a/android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt +++ b/android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt @@ -82,11 +82,11 @@ class MapLibreMapController( val options = MapLibreMapOptions .createFromAttributes(context) - .attributionEnabled(mapOptions.attribution) - .logoEnabled(mapOptions.logo) + .attributionEnabled(false) + .logoEnabled(false) // TODO: textureMode comes at a significant performance penalty, https://maplibre.org/maplibre-native/android/api/-map-libre%20-native%20-android/org.maplibre.android.maps/-map-libre-map-options/texture-mode.html .textureMode(mapOptions.androidTextureMode) - .compassEnabled(mapOptions.compass) + .compassEnabled(false) .minZoomPreference(mapOptions.minZoom) .maxZoomPreference(mapOptions.maxZoom) .minPitchPreference(mapOptions.minPitch) diff --git a/android/src/main/kotlin/com/github/josxha/maplibre/Pigeon.g.kt b/android/src/main/kotlin/com/github/josxha/maplibre/Pigeon.g.kt index 4e649b10..29c20c73 100644 --- a/android/src/main/kotlin/com/github/josxha/maplibre/Pigeon.g.kt +++ b/android/src/main/kotlin/com/github/josxha/maplibre/Pigeon.g.kt @@ -123,12 +123,6 @@ data class MapOptions ( val maxPitch: Double, /** The map gestures. */ val gestures: MapGestures, - /** Toggle the MapLibre Native compass. */ - val compass: Boolean, - /** Toggle the MapLibre Native logo. */ - val logo: Boolean, - /** Toggle the MapLibre Native attribution. */ - val attribution: Boolean, /** Toggle the texture mode on android. */ val androidTextureMode: Boolean ) @@ -146,11 +140,8 @@ data class MapOptions ( val minPitch = pigeonVar_list[8] as Double val maxPitch = pigeonVar_list[9] as Double val gestures = pigeonVar_list[10] as MapGestures - val compass = pigeonVar_list[11] as Boolean - val logo = pigeonVar_list[12] as Boolean - val attribution = pigeonVar_list[13] as Boolean - val androidTextureMode = pigeonVar_list[14] as Boolean - return MapOptions(style, zoom, pitch, bearing, center, maxBounds, minZoom, maxZoom, minPitch, maxPitch, gestures, compass, logo, attribution, androidTextureMode) + val androidTextureMode = pigeonVar_list[11] as Boolean + return MapOptions(style, zoom, pitch, bearing, center, maxBounds, minZoom, maxZoom, minPitch, maxPitch, gestures, androidTextureMode) } } fun toList(): List { @@ -166,9 +157,6 @@ data class MapOptions ( minPitch, maxPitch, gestures, - compass, - logo, - attribution, androidTextureMode, ) } diff --git a/example/lib/styled_map_page.dart b/example/lib/styled_map_page.dart index f3263326..fed6375a 100644 --- a/example/lib/styled_map_page.dart +++ b/example/lib/styled_map_page.dart @@ -33,7 +33,6 @@ class _StyledMapPageState extends State { initStyle: Theme.of(context).brightness == Brightness.light ? StyledMapPage.styleUrl : StyledMapPage.styleUrlDark, - attribution: false, ), children: const [SourceAttribution()], ), diff --git a/example/lib/user_interface_page.dart b/example/lib/user_interface_page.dart index 3aa70034..caea47fe 100644 --- a/example/lib/user_interface_page.dart +++ b/example/lib/user_interface_page.dart @@ -24,9 +24,6 @@ class _UserInterfacePageState extends State { initStyle: Theme.of(context).brightness == Brightness.light ? StyledMapPage.styleUrl : StyledMapPage.styleUrlDark, - attribution: false, - nativeCompass: false, - nativeLogo: false, ), children: const [ MapScalebar(), diff --git a/example/lib/widget_layer_page.dart b/example/lib/widget_layer_page.dart index a1378e98..c482738e 100644 --- a/example/lib/widget_layer_page.dart +++ b/example/lib/widget_layer_page.dart @@ -20,9 +20,6 @@ class _WidgetLayerPageState extends State { options: MapOptions( initZoom: 3, initCenter: Position(0, 0), - attribution: false, - nativeCompass: false, - nativeLogo: false, ), children: [ WidgetLayer( diff --git a/ios/Classes/Pigeon.g.swift b/ios/Classes/Pigeon.g.swift index 4322cfd6..2847cd1e 100644 --- a/ios/Classes/Pigeon.g.swift +++ b/ios/Classes/Pigeon.g.swift @@ -123,12 +123,6 @@ struct MapOptions { var maxPitch: Double /// The map gestures. var gestures: MapGestures - /// Toggle the MapLibre Native compass. - var compass: Bool - /// Toggle the MapLibre Native logo. - var logo: Bool - /// Toggle the MapLibre Native attribution. - var attribution: Bool /// Toggle the texture mode on android. var androidTextureMode: Bool @@ -147,10 +141,7 @@ struct MapOptions { let minPitch = pigeonVar_list[8] as! Double let maxPitch = pigeonVar_list[9] as! Double let gestures = pigeonVar_list[10] as! MapGestures - let compass = pigeonVar_list[11] as! Bool - let logo = pigeonVar_list[12] as! Bool - let attribution = pigeonVar_list[13] as! Bool - let androidTextureMode = pigeonVar_list[14] as! Bool + let androidTextureMode = pigeonVar_list[11] as! Bool return MapOptions( style: style, @@ -164,9 +155,6 @@ struct MapOptions { minPitch: minPitch, maxPitch: maxPitch, gestures: gestures, - compass: compass, - logo: logo, - attribution: attribution, androidTextureMode: androidTextureMode ) } @@ -183,9 +171,6 @@ struct MapOptions { minPitch, maxPitch, gestures, - compass, - logo, - attribution, androidTextureMode, ] } diff --git a/lib/src/map_options.dart b/lib/src/map_options.dart index 96f4756a..e9605152 100644 --- a/lib/src/map_options.dart +++ b/lib/src/map_options.dart @@ -20,9 +20,6 @@ class MapOptions { this.maxPitch = 60, this.maxBounds, this.gestures = const MapGestures.all(), - this.nativeCompass = true, - this.nativeLogo = true, - this.attribution = true, this.androidTextureMode = true, this.androidMode = AndroidPlatformViewMode.tlhc_vd, }) : initPitch = pitch ?? initPitch; @@ -79,15 +76,6 @@ class MapOptions { /// Enable and disable some or all map gestures. final MapGestures gestures; - /// Toggle the MapLibre Native compass. - final bool nativeCompass; - - /// Toggle the MapLibre Native logo. - final bool nativeLogo; - - /// Toggle the MapLibre Native logo. - final bool attribution; - /// The platform view type used on android. /// /// https://docs.flutter.dev/platform-integration/android/platform-views diff --git a/lib/src/platform/android/widget_state.dart b/lib/src/platform/android/widget_state.dart index 4997f40e..688e363a 100644 --- a/lib/src/platform/android/widget_state.dart +++ b/lib/src/platform/android/widget_state.dart @@ -218,9 +218,6 @@ final class MapLibreMapStateAndroid extends MapLibreMapState zoom: _options.gestures.zoom, tilt: _options.gestures.pitch, ), - compass: _options.nativeCompass, - logo: _options.nativeLogo, - attribution: _options.attribution, androidTextureMode: _options.androidTextureMode, ); diff --git a/lib/src/platform/pigeon.g.dart b/lib/src/platform/pigeon.g.dart index fef85dad..bf111e19 100644 --- a/lib/src/platform/pigeon.g.dart +++ b/lib/src/platform/pigeon.g.dart @@ -74,9 +74,6 @@ class MapOptions { required this.minPitch, required this.maxPitch, required this.gestures, - required this.compass, - required this.logo, - required this.attribution, required this.androidTextureMode, }); @@ -113,15 +110,6 @@ class MapOptions { /// The map gestures. MapGestures gestures; - /// Toggle the MapLibre Native compass. - bool compass; - - /// Toggle the MapLibre Native logo. - bool logo; - - /// Toggle the MapLibre Native attribution. - bool attribution; - /// Toggle the texture mode on android. bool androidTextureMode; @@ -138,9 +126,6 @@ class MapOptions { minPitch, maxPitch, gestures, - compass, - logo, - attribution, androidTextureMode, ]; } @@ -159,10 +144,7 @@ class MapOptions { minPitch: result[8]! as double, maxPitch: result[9]! as double, gestures: result[10]! as MapGestures, - compass: result[11]! as bool, - logo: result[12]! as bool, - attribution: result[13]! as bool, - androidTextureMode: result[14]! as bool, + androidTextureMode: result[11]! as bool, ); } } diff --git a/lib/src/platform/web/widget_state.dart b/lib/src/platform/web/widget_state.dart index 62149b08..8dd4cf54 100644 --- a/lib/src/platform/web/widget_state.dart +++ b/lib/src/platform/web/widget_state.dart @@ -44,7 +44,7 @@ final class MapLibreMapStateWeb extends MapLibreMapState { center: options.initCenter?.toLngLat(), bearing: options.initBearing, pitch: options.initPitch, - attributionControl: options.attribution, + attributionControl: false, ), ); diff --git a/linux/pigeon.g.cc b/linux/pigeon.g.cc index 8acb308c..05fa1682 100644 --- a/linux/pigeon.g.cc +++ b/linux/pigeon.g.cc @@ -17,9 +17,6 @@ struct _MaplibreMapOptions { double min_pitch; double max_pitch; MaplibreMapGestures* gestures; - gboolean compass; - gboolean logo; - gboolean attribution; gboolean android_texture_mode; }; @@ -41,7 +38,7 @@ static void maplibre_map_options_class_init(MaplibreMapOptionsClass* klass) { G_OBJECT_CLASS(klass)->dispose = maplibre_map_options_dispose; } -MaplibreMapOptions* maplibre_map_options_new(const gchar* style, double zoom, double pitch, double bearing, MaplibreLngLat* center, MaplibreLngLatBounds* max_bounds, double min_zoom, double max_zoom, double min_pitch, double max_pitch, MaplibreMapGestures* gestures, gboolean compass, gboolean logo, gboolean attribution, gboolean android_texture_mode) { +MaplibreMapOptions* maplibre_map_options_new(const gchar* style, double zoom, double pitch, double bearing, MaplibreLngLat* center, MaplibreLngLatBounds* max_bounds, double min_zoom, double max_zoom, double min_pitch, double max_pitch, MaplibreMapGestures* gestures, gboolean android_texture_mode) { MaplibreMapOptions* self = MAPLIBRE_MAP_OPTIONS(g_object_new(maplibre_map_options_get_type(), nullptr)); self->style = g_strdup(style); self->zoom = zoom; @@ -64,9 +61,6 @@ MaplibreMapOptions* maplibre_map_options_new(const gchar* style, double zoom, do self->min_pitch = min_pitch; self->max_pitch = max_pitch; self->gestures = MAPLIBRE_MAP_GESTURES(g_object_ref(gestures)); - self->compass = compass; - self->logo = logo; - self->attribution = attribution; self->android_texture_mode = android_texture_mode; return self; } @@ -126,21 +120,6 @@ MaplibreMapGestures* maplibre_map_options_get_gestures(MaplibreMapOptions* self) return self->gestures; } -gboolean maplibre_map_options_get_compass(MaplibreMapOptions* self) { - g_return_val_if_fail(MAPLIBRE_IS_MAP_OPTIONS(self), FALSE); - return self->compass; -} - -gboolean maplibre_map_options_get_logo(MaplibreMapOptions* self) { - g_return_val_if_fail(MAPLIBRE_IS_MAP_OPTIONS(self), FALSE); - return self->logo; -} - -gboolean maplibre_map_options_get_attribution(MaplibreMapOptions* self) { - g_return_val_if_fail(MAPLIBRE_IS_MAP_OPTIONS(self), FALSE); - return self->attribution; -} - gboolean maplibre_map_options_get_android_texture_mode(MaplibreMapOptions* self) { g_return_val_if_fail(MAPLIBRE_IS_MAP_OPTIONS(self), FALSE); return self->android_texture_mode; @@ -159,9 +138,6 @@ static FlValue* maplibre_map_options_to_list(MaplibreMapOptions* self) { fl_value_append_take(values, fl_value_new_float(self->min_pitch)); fl_value_append_take(values, fl_value_new_float(self->max_pitch)); fl_value_append_take(values, fl_value_new_custom_object(133, G_OBJECT(self->gestures))); - fl_value_append_take(values, fl_value_new_bool(self->compass)); - fl_value_append_take(values, fl_value_new_bool(self->logo)); - fl_value_append_take(values, fl_value_new_bool(self->attribution)); fl_value_append_take(values, fl_value_new_bool(self->android_texture_mode)); return values; } @@ -196,14 +172,8 @@ static MaplibreMapOptions* maplibre_map_options_new_from_list(FlValue* values) { FlValue* value10 = fl_value_get_list_value(values, 10); MaplibreMapGestures* gestures = MAPLIBRE_MAP_GESTURES(fl_value_get_custom_value_object(value10)); FlValue* value11 = fl_value_get_list_value(values, 11); - gboolean compass = fl_value_get_bool(value11); - FlValue* value12 = fl_value_get_list_value(values, 12); - gboolean logo = fl_value_get_bool(value12); - FlValue* value13 = fl_value_get_list_value(values, 13); - gboolean attribution = fl_value_get_bool(value13); - FlValue* value14 = fl_value_get_list_value(values, 14); - gboolean android_texture_mode = fl_value_get_bool(value14); - return maplibre_map_options_new(style, zoom, pitch, bearing, center, max_bounds, min_zoom, max_zoom, min_pitch, max_pitch, gestures, compass, logo, attribution, android_texture_mode); + gboolean android_texture_mode = fl_value_get_bool(value11); + return maplibre_map_options_new(style, zoom, pitch, bearing, center, max_bounds, min_zoom, max_zoom, min_pitch, max_pitch, gestures, android_texture_mode); } struct _MaplibreMapGestures { diff --git a/linux/pigeon.g.h b/linux/pigeon.g.h index 6dec0ada..66eb2150 100644 --- a/linux/pigeon.g.h +++ b/linux/pigeon.g.h @@ -78,16 +78,13 @@ G_DECLARE_FINAL_TYPE(MaplibreMapOptions, maplibre_map_options, MAPLIBRE, MAP_OPT * min_pitch: field in this object. * max_pitch: field in this object. * gestures: field in this object. - * compass: field in this object. - * logo: field in this object. - * attribution: field in this object. * android_texture_mode: field in this object. * * Creates a new #MapOptions object. * * Returns: a new #MaplibreMapOptions */ -MaplibreMapOptions* maplibre_map_options_new(const gchar* style, double zoom, double pitch, double bearing, MaplibreLngLat* center, MaplibreLngLatBounds* max_bounds, double min_zoom, double max_zoom, double min_pitch, double max_pitch, MaplibreMapGestures* gestures, gboolean compass, gboolean logo, gboolean attribution, gboolean android_texture_mode); +MaplibreMapOptions* maplibre_map_options_new(const gchar* style, double zoom, double pitch, double bearing, MaplibreLngLat* center, MaplibreLngLatBounds* max_bounds, double min_zoom, double max_zoom, double min_pitch, double max_pitch, MaplibreMapGestures* gestures, gboolean android_texture_mode); /** * maplibre_map_options_get_style @@ -199,36 +196,6 @@ double maplibre_map_options_get_max_pitch(MaplibreMapOptions* object); */ MaplibreMapGestures* maplibre_map_options_get_gestures(MaplibreMapOptions* object); -/** - * maplibre_map_options_get_compass - * @object: a #MaplibreMapOptions. - * - * Toggle the MapLibre Native compass. - * - * Returns: the field value. - */ -gboolean maplibre_map_options_get_compass(MaplibreMapOptions* object); - -/** - * maplibre_map_options_get_logo - * @object: a #MaplibreMapOptions. - * - * Toggle the MapLibre Native logo. - * - * Returns: the field value. - */ -gboolean maplibre_map_options_get_logo(MaplibreMapOptions* object); - -/** - * maplibre_map_options_get_attribution - * @object: a #MaplibreMapOptions. - * - * Toggle the MapLibre Native attribution. - * - * Returns: the field value. - */ -gboolean maplibre_map_options_get_attribution(MaplibreMapOptions* object); - /** * maplibre_map_options_get_android_texture_mode * @object: a #MaplibreMapOptions. diff --git a/macos/Classes/Pigeon.g.swift b/macos/Classes/Pigeon.g.swift index 4322cfd6..2847cd1e 100644 --- a/macos/Classes/Pigeon.g.swift +++ b/macos/Classes/Pigeon.g.swift @@ -123,12 +123,6 @@ struct MapOptions { var maxPitch: Double /// The map gestures. var gestures: MapGestures - /// Toggle the MapLibre Native compass. - var compass: Bool - /// Toggle the MapLibre Native logo. - var logo: Bool - /// Toggle the MapLibre Native attribution. - var attribution: Bool /// Toggle the texture mode on android. var androidTextureMode: Bool @@ -147,10 +141,7 @@ struct MapOptions { let minPitch = pigeonVar_list[8] as! Double let maxPitch = pigeonVar_list[9] as! Double let gestures = pigeonVar_list[10] as! MapGestures - let compass = pigeonVar_list[11] as! Bool - let logo = pigeonVar_list[12] as! Bool - let attribution = pigeonVar_list[13] as! Bool - let androidTextureMode = pigeonVar_list[14] as! Bool + let androidTextureMode = pigeonVar_list[11] as! Bool return MapOptions( style: style, @@ -164,9 +155,6 @@ struct MapOptions { minPitch: minPitch, maxPitch: maxPitch, gestures: gestures, - compass: compass, - logo: logo, - attribution: attribution, androidTextureMode: androidTextureMode ) } @@ -183,9 +171,6 @@ struct MapOptions { minPitch, maxPitch, gestures, - compass, - logo, - attribution, androidTextureMode, ] } diff --git a/pigeons/pigeon.dart b/pigeons/pigeon.dart index 8d8f26b9..5ab5620c 100644 --- a/pigeons/pigeon.dart +++ b/pigeons/pigeon.dart @@ -183,9 +183,6 @@ class MapOptions { required this.minPitch, required this.maxPitch, required this.gestures, - required this.compass, - required this.logo, - required this.attribution, required this.androidTextureMode, }); @@ -222,15 +219,6 @@ class MapOptions { /// The map gestures. final MapGestures gestures; - /// Toggle the MapLibre Native compass. - final bool compass; - - /// Toggle the MapLibre Native logo. - final bool logo; - - /// Toggle the MapLibre Native attribution. - final bool attribution; - /// Toggle the texture mode on android. final bool androidTextureMode; } diff --git a/windows/runner/pigeon.g.cpp b/windows/runner/pigeon.g.cpp index d51d8018..6901cb03 100644 --- a/windows/runner/pigeon.g.cpp +++ b/windows/runner/pigeon.g.cpp @@ -40,9 +40,6 @@ MapOptions::MapOptions( double min_pitch, double max_pitch, const MapGestures& gestures, - bool compass, - bool logo, - bool attribution, bool android_texture_mode) : style_(style), zoom_(zoom), @@ -53,9 +50,6 @@ MapOptions::MapOptions( min_pitch_(min_pitch), max_pitch_(max_pitch), gestures_(std::make_unique(gestures)), - compass_(compass), - logo_(logo), - attribution_(attribution), android_texture_mode_(android_texture_mode) {} MapOptions::MapOptions( @@ -70,9 +64,6 @@ MapOptions::MapOptions( double min_pitch, double max_pitch, const MapGestures& gestures, - bool compass, - bool logo, - bool attribution, bool android_texture_mode) : style_(style), zoom_(zoom), @@ -85,9 +76,6 @@ MapOptions::MapOptions( min_pitch_(min_pitch), max_pitch_(max_pitch), gestures_(std::make_unique(gestures)), - compass_(compass), - logo_(logo), - attribution_(attribution), android_texture_mode_(android_texture_mode) {} MapOptions::MapOptions(const MapOptions& other) @@ -102,9 +90,6 @@ MapOptions::MapOptions(const MapOptions& other) min_pitch_(other.min_pitch_), max_pitch_(other.max_pitch_), gestures_(std::make_unique(*other.gestures_)), - compass_(other.compass_), - logo_(other.logo_), - attribution_(other.attribution_), android_texture_mode_(other.android_texture_mode_) {} MapOptions& MapOptions::operator=(const MapOptions& other) { @@ -119,9 +104,6 @@ MapOptions& MapOptions::operator=(const MapOptions& other) { min_pitch_ = other.min_pitch_; max_pitch_ = other.max_pitch_; gestures_ = std::make_unique(*other.gestures_); - compass_ = other.compass_; - logo_ = other.logo_; - attribution_ = other.attribution_; android_texture_mode_ = other.android_texture_mode_; return *this; } @@ -233,33 +215,6 @@ void MapOptions::set_gestures(const MapGestures& value_arg) { } -bool MapOptions::compass() const { - return compass_; -} - -void MapOptions::set_compass(bool value_arg) { - compass_ = value_arg; -} - - -bool MapOptions::logo() const { - return logo_; -} - -void MapOptions::set_logo(bool value_arg) { - logo_ = value_arg; -} - - -bool MapOptions::attribution() const { - return attribution_; -} - -void MapOptions::set_attribution(bool value_arg) { - attribution_ = value_arg; -} - - bool MapOptions::android_texture_mode() const { return android_texture_mode_; } @@ -271,7 +226,7 @@ void MapOptions::set_android_texture_mode(bool value_arg) { EncodableList MapOptions::ToEncodableList() const { EncodableList list; - list.reserve(15); + list.reserve(12); list.push_back(EncodableValue(style_)); list.push_back(EncodableValue(zoom_)); list.push_back(EncodableValue(pitch_)); @@ -283,9 +238,6 @@ EncodableList MapOptions::ToEncodableList() const { list.push_back(EncodableValue(min_pitch_)); list.push_back(EncodableValue(max_pitch_)); list.push_back(CustomEncodableValue(*gestures_)); - list.push_back(EncodableValue(compass_)); - list.push_back(EncodableValue(logo_)); - list.push_back(EncodableValue(attribution_)); list.push_back(EncodableValue(android_texture_mode_)); return list; } @@ -301,10 +253,7 @@ MapOptions MapOptions::FromEncodableList(const EncodableList& list) { std::get(list[8]), std::get(list[9]), std::any_cast(std::get(list[10])), - std::get(list[11]), - std::get(list[12]), - std::get(list[13]), - std::get(list[14])); + std::get(list[11])); auto& encodable_center = list[4]; if (!encodable_center.IsNull()) { decoded.set_center(std::any_cast(std::get(encodable_center))); diff --git a/windows/runner/pigeon.g.h b/windows/runner/pigeon.g.h index b9e9860c..30971097 100644 --- a/windows/runner/pigeon.g.h +++ b/windows/runner/pigeon.g.h @@ -104,9 +104,6 @@ class MapOptions { double min_pitch, double max_pitch, const MapGestures& gestures, - bool compass, - bool logo, - bool attribution, bool android_texture_mode); // Constructs an object setting all fields. @@ -122,9 +119,6 @@ class MapOptions { double min_pitch, double max_pitch, const MapGestures& gestures, - bool compass, - bool logo, - bool attribution, bool android_texture_mode); ~MapOptions() = default; @@ -178,18 +172,6 @@ class MapOptions { const MapGestures& gestures() const; void set_gestures(const MapGestures& value_arg); - // Toggle the MapLibre Native compass. - bool compass() const; - void set_compass(bool value_arg); - - // Toggle the MapLibre Native logo. - bool logo() const; - void set_logo(bool value_arg); - - // Toggle the MapLibre Native attribution. - bool attribution() const; - void set_attribution(bool value_arg); - // Toggle the texture mode on android. bool android_texture_mode() const; void set_android_texture_mode(bool value_arg); @@ -213,9 +195,6 @@ class MapOptions { double min_pitch_; double max_pitch_; std::unique_ptr gestures_; - bool compass_; - bool logo_; - bool attribution_; bool android_texture_mode_; };