Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions example/lib/features_query_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:maplibre/maplibre.dart';
import 'package:maplibre_example/utils/map_styles.dart';

@immutable
class FeaturesQueryPage extends StatefulWidget {
Expand All @@ -23,9 +24,10 @@ class _FeaturesQueryPageState extends State<FeaturesQueryPage> {
return Scaffold(
appBar: AppBar(title: const Text('Query Features')),
body: MapLibreMap(
options: const MapOptions(
options: MapOptions(
initZoom: 7,
initCenter: Geographic(lon: 0.1, lat: 0.1),
initCenter: const Geographic(lon: 0.1, lat: 0.1),
initStyle: MapStyles.openMapTilesBright.uri,
),
onMapCreated: (controller) => _controller = controller,
onStyleLoaded: _onStyleLoaded,
Expand Down
7 changes: 4 additions & 3 deletions lib/src/platform/ios/map_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ final class MapLibreMapStateIos extends MapLibreMapStateNative
if (center != null) {
ffiCamera.centerCoordinate = center.toCLLocationCoordinate2D();
}
_mapView.flyToCamera$1(
_mapView.flyToCamera$2(
ffiCamera,
withDuration: nativeDuration.inMicroseconds / 1000000,
);
Expand Down Expand Up @@ -200,7 +200,8 @@ final class MapLibreMapStateIos extends MapLibreMapStateNative
} else if (NSString.isInstance(object)) {
return NSString.castFrom(object).toDartString();
} else if (NSNumber.isInstance(object)) {
return NSNumber.castFrom(object).intValue;
final number = NSNumber.castFrom(object);
return number.longLongValue;
}
return null;
}
Expand Down Expand Up @@ -330,7 +331,7 @@ final class MapLibreMapStateIos extends MapLibreMapStateNative

@override
Geographic toLngLat(Offset screenLocation) => _mapView
.convertPoint_(screenLocation.toCGPoint(), view: _mapView)
.convertPoint$2(screenLocation.toCGPoint(), toCoordinateFromView: _mapView)
.toGeographic();

@override
Expand Down
10 changes: 5 additions & 5 deletions lib/src/platform/ios/style_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class StyleControllerIos extends StyleController {
case BackgroundStyleLayer():
ffiStyleLayer = MLNBackgroundStyleLayer.new$()
..initWithIdentifier(ffiId)
..backgroundColor = NSExpression.expressionWithFormat$1(
..backgroundColor = NSExpression.expressionWithFormat(
layer.color.toHexString().toNSString(),
);
case StyleLayerWithSource():
Expand Down Expand Up @@ -96,15 +96,15 @@ class StyleControllerIos extends StyleController {
if (belowLayer == null) {
throw Exception('Layer "$id" does not exist.');
}
_ffiStyle.insertLayer$1(ffiStyleLayer, belowLayer: belowLayer);
_ffiStyle.insertLayer$2(ffiStyleLayer, belowLayer: belowLayer);
} else if (aboveLayerId case final String id) {
final aboveLayer = _ffiStyle.layerWithIdentifier(id.toNSString());
if (aboveLayer == null) {
throw Exception('Layer "$id" does not exist.');
}
_ffiStyle.insertLayer$2(ffiStyleLayer, aboveLayer: aboveLayer);
_ffiStyle.insertLayer(ffiStyleLayer, aboveLayer: aboveLayer);
} else if (atIndex case final int index) {
_ffiStyle.insertLayer(ffiStyleLayer, atIndex: index);
_ffiStyle.insertLayer$1(ffiStyleLayer, atIndex: index);
} else {
_ffiStyle.addLayer(ffiStyleLayer);
}
Expand All @@ -125,7 +125,7 @@ class StyleControllerIos extends StyleController {
case GeoJsonSource():
final shapeSource = MLNShapeSource.new$();
if (source.data.startsWith('{')) {
shapeSource.initWithIdentifier$1(
shapeSource.initWithIdentifier$2(
ffiId,
shape: MLNShape.shapeWithData(
source.data.toNSDataUTF8()!,
Expand Down
Loading
Loading