Ejemplo n.º 1
0
        private List <OsmGeo> GetOsmGeoListFromMapStreamService(MapBounds mapbounds)
        {
            List <OsmGeo> list = new List <OsmGeo>();

            if (mapbounds.IsLarge(false))
            {
                var split = mapbounds.Split(false);
                list.AddRange(GetOsmGeoListFromMapStreamService(split[0]));
                list.AddRange(GetOsmGeoListFromMapStreamService(split[1]));
            }
            else if (mapbounds.IsLarge(true))
            {
                var split = mapbounds.Split(true);
                list.AddRange(GetOsmGeoListFromMapStreamService(split[0]));
                list.AddRange(GetOsmGeoListFromMapStreamService(split[1]));
            }
            else
            {
                var streamService = ContainerStore.Resolve <IMapStreamService>();
                return(streamService.GetOsmGeoList(mapbounds));
            }

            return(list.GroupBy(n => n.Id).Select(g => g.First()).ToList());
        }