@@ -269,30 +269,32 @@ void OnCameraPositionChanged(GCameraPosition pos)
269
269
var maxLon = Math . Max ( Math . Max ( Math . Max ( region . NearLeft . Longitude , region . NearRight . Longitude ) , region . FarLeft . Longitude ) , region . FarRight . Longitude ) ;
270
270
mapModel . VisibleRegion = new MapSpan ( pos . Target . ToPosition ( ) , maxLat - minLat , maxLon - minLon ) ;
271
271
272
- // Simone Marra
273
- CoreGraphics . CGPoint topLeftPoint = new CoreGraphics . CGPoint ( 0 , 0 ) ;
274
- CoreLocation . CLLocationCoordinate2D topLeftLocation = mkMapView . Projection . CoordinateForPoint ( topLeftPoint ) ;
275
-
276
- CoreGraphics . CGPoint bottomRightPoint = new CoreGraphics . CGPoint ( mkMapView . Frame . Size . Width , mkMapView . Frame . Size . Height ) ;
277
- CoreLocation . CLLocationCoordinate2D bottomRightLocation = mkMapView . Projection . CoordinateForPoint ( bottomRightPoint ) ;
278
-
279
- CoreGraphics . CGPoint topRightPoint = new CoreGraphics . CGPoint ( mkMapView . Frame . Size . Width , 0 ) ;
280
- CoreLocation . CLLocationCoordinate2D topRightLocation = mkMapView . Projection . CoordinateForPoint ( topRightPoint ) ;
281
-
282
- CoreGraphics . CGPoint bottomLeftPoint = new CoreGraphics . CGPoint ( 0 , mkMapView . Frame . Size . Height ) ;
283
- CoreLocation . CLLocationCoordinate2D bottomLeftLocation = mkMapView . Projection . CoordinateForPoint ( bottomLeftPoint ) ;
284
-
285
- VisibleRegion realVisibleRegion = new VisibleRegion ( ) ;
286
- realVisibleRegion . FarLeft = topLeftLocation ;
287
- realVisibleRegion . FarRight = topRightLocation ;
288
- realVisibleRegion . NearLeft = bottomLeftLocation ;
289
- realVisibleRegion . NearRight = bottomRightLocation ;
290
-
291
- ( ( Map ) Element ) . TopLeft = new Position ( topLeftLocation . Latitude , topLeftLocation . Longitude ) ;
292
- ( ( Map ) Element ) . TopRight = new Position ( topRightLocation . Latitude , topRightLocation . Longitude ) ;
293
- ( ( Map ) Element ) . BottomLeft = new Position ( bottomLeftLocation . Latitude , bottomLeftLocation . Longitude ) ;
294
- ( ( Map ) Element ) . BottomRight = new Position ( bottomRightLocation . Latitude , bottomRightLocation . Longitude ) ;
295
- // End Simone Marra
272
+ //// Simone Marra
273
+ //CoreGraphics.CGPoint topLeftPoint = new CoreGraphics.CGPoint(0, 0);
274
+ //CoreLocation.CLLocationCoordinate2D topLeftLocation = mkMapView.Projection.CoordinateForPoint(topLeftPoint);
275
+
276
+ //CoreGraphics.CGPoint bottomRightPoint = new CoreGraphics.CGPoint(mkMapView.Frame.Size.Width, mkMapView.Frame.Size.Height);
277
+ //CoreLocation.CLLocationCoordinate2D bottomRightLocation = mkMapView.Projection.CoordinateForPoint(bottomRightPoint);
278
+
279
+ //CoreGraphics.CGPoint topRightPoint = new CoreGraphics.CGPoint(mkMapView.Frame.Size.Width, 0);
280
+ //CoreLocation.CLLocationCoordinate2D topRightLocation = mkMapView.Projection.CoordinateForPoint(topRightPoint);
281
+
282
+ //CoreGraphics.CGPoint bottomLeftPoint = new CoreGraphics.CGPoint(0, mkMapView.Frame.Size.Height);
283
+ //CoreLocation.CLLocationCoordinate2D bottomLeftLocation = mkMapView.Projection.CoordinateForPoint(bottomLeftPoint);
284
+
285
+ //VisibleRegion realVisibleRegion = new VisibleRegion();
286
+ //realVisibleRegion.FarLeft = topLeftLocation;
287
+ //realVisibleRegion.FarRight = topRightLocation;
288
+ //realVisibleRegion.NearLeft = bottomLeftLocation;
289
+ //realVisibleRegion.NearRight = bottomRightLocation;
290
+
291
+ //((Map)Element).TopLeft = new Position(topLeftLocation.Latitude, topLeftLocation.Longitude);
292
+ //((Map)Element).TopRight = new Position(topRightLocation.Latitude, topRightLocation.Longitude);
293
+ //((Map)Element).BottomLeft = new Position(bottomLeftLocation.Latitude, bottomLeftLocation.Longitude);
294
+ //((Map)Element).BottomRight = new Position(bottomRightLocation.Latitude, bottomRightLocation.Longitude);
295
+ //// End Simone Marra
296
+
297
+ Map . Region = mkMapView . Projection . VisibleRegion . ToRegion ( ) ;
296
298
297
299
var camera = pos . ToXamarinForms ( ) ;
298
300
Map . CameraPosition = camera ;
0 commit comments