|
|
@@ -54,6 +54,7 @@ static NSString* viewType = @"com.i2edu.mapView";
|
|
|
_mapView = [[MAMapView alloc] initWithFrame:frame];
|
|
|
_mapView.backgroundColor = [UIColor clearColor];
|
|
|
_mapView.frame = frame;
|
|
|
+ [_mapView setZoomLevel:17.5 animated:YES];
|
|
|
[_mapView updateUserLocationRepresentation:[self getRepresentation]];
|
|
|
_mapView.delegate=self;
|
|
|
|
|
|
@@ -104,6 +105,14 @@ static NSString* viewType = @"com.i2edu.mapView";
|
|
|
}else if([call.method isEqualToString:@"onPause"]){
|
|
|
result(nil);
|
|
|
}else if([call.method isEqualToString:@"onResume"]){
|
|
|
+ result(nil);
|
|
|
+ }else if([call.method isEqualToString:@"moveCamera"]){
|
|
|
+ NSDictionary *data = [call.arguments objectForKey:@"data"];
|
|
|
+ NSNumber *x = data[@"x"];
|
|
|
+ NSNumber *y = data[@"y"];
|
|
|
+ _mapView.centerCoordinate=CLLocationCoordinate2DMake(x.doubleValue, y.doubleValue);
|
|
|
+
|
|
|
+
|
|
|
result(nil);
|
|
|
}else {
|
|
|
result(FlutterMethodNotImplemented);
|