Exemple #1
0
        /// <summary>
        /// Gets the species map counts
        /// </summary>
        /// <param name="speciesId">The species id.</param>
        /// <returns>List of <see cref="MapCount"/></returns>
        public static List <MapCount> GetSpeciesMap(Guid speciesId, int year)
        {
            List <MapCount> mapList = new List <MapCount>();

            using (IDataReader reader = ResultsMapper.GetSiteBySpecies_ForMap(speciesId, year))
            {
                while (reader.Read())
                {
                    mapList.Add(new MapCount()
                    {
                        Count     = reader.GetIntFromName("SpeciesCount"),
                        Latitude  = reader.GetDecimalFromName("Latitude"),
                        Longitude = reader.GetDecimalFromName("Longitude")
                    });
                }
            }

            return(mapList);
        }