public static GraphicCollection LoadRoutes( rteTypeCollection rtes ) { rtes.RequireArgument<rteTypeCollection>( "rtes" ).NotNull<rteTypeCollection>(); GraphicCollection routes = new GraphicCollection(); foreach( var rte in rtes ) { Graphic gr = new Graphic(); gr.Geometry = LoadRoute( rte.rtept ); LoadRouteAttributes( rte, gr.Attributes ); routes.Add( gr ); } return routes; }
private void LoadRoutes( rteTypeCollection rtes, GraphicCollection graphics ) { rtes.RequireArgument<rteTypeCollection>( "rtes" ).NotNull<rteTypeCollection>(); foreach( var rte in rtes ) { Graphic gr = new Graphic() { Geometry = LoadRoute(rte.rtept) }; LoadRouteAttributes(rte, gr.Attributes); gr.Symbol = Renderer.GetSymbol( gr ); graphics.Add( gr ); } }