FromPositions() public static method

Creates a new map region that includes the specified positons.
public static FromPositions ( IEnumerable positions ) : MapRegion
positions IEnumerable The positions.
return MapRegion
Exemplo n.º 1
0
        internal MapRegion GetRegionForAllAnnotations()
        {
            var allPinPositions = _renderer.Map.Pins.OfType <IMapPin>().Select(p => p.Location);

            return(MapRegion.FromPositions(allPinPositions));
        }
Exemplo n.º 2
0
        internal MapRegion GetRegionForAllAnnotations()
        {
            var allPinPositions = _renderer.Map.Pins?.OfType <IMapPin>()?.Select(p => p.Location);

            return(allPinPositions == null || allPinPositions.Count() == 0 ? MapRegion.Empty() : MapRegion.FromPositions(allPinPositions));
        }