Beispiel #1
0
        public MapObjects2.ValueMapRenderer GetValueRender(ValueRenderStruct render)
        {
            MapObjects2.ValueMapRenderer oMapRender = new MapObjects2.ValueMapRendererClass();

            this.ConvertSymbol(render.DefaultSymbol, oMapRender.DefaultSymbol);

            oMapRender.Field         = render.Field;
            oMapRender.RotationField = render.RotationField;
            oMapRender.ScalingField  = render.ScaleField;
            oMapRender.SymbolType    = (MapObjects2.SymbolTypeConstants)render.SymbolType;
            oMapRender.Tag           = render.Tag;
            oMapRender.UseDefault    = render.UseDefault;
            oMapRender.ValueCount    = render.ValueCount;

            short iIndex = 0;

            foreach (SymbolStruct oSymbol in render.SymbolList)
            {
                ConvertSymbol(oSymbol, oMapRender.get_Symbol(iIndex));
                oMapRender.set_Value((short)iIndex, render.ValueList[iIndex]);

                iIndex++;
            }

            return(oMapRender);
        }
Beispiel #2
0
        private GroupRenderStruct ExportGroupRender(MapObjects2.GroupRenderer render)
        {
            GroupRenderStruct oGroupRender = new GroupRenderStruct();
            short             iIndex       = 0;

            oGroupRender.DrawBackground = render.DrawBackground;
            oGroupRender.Tag            = render.Tag;

            object oMapSubRender = render.get_Renderer(iIndex);

            while (oMapSubRender != null)
            {
                if (oMapSubRender is MapObjects2.ValueMapRenderer)
                {
                    ValueRenderStruct oValueRender = this.ExportValueRender(oMapSubRender as MapObjects2.ValueMapRenderer);
                    oGroupRender.RenderList.Add(oValueRender);
                }
                else if (oMapSubRender is MapObjects2.ClassBreaksRenderer)
                {
                    ClassBreakRenderStruct oClassBreakRender = this.ExportClassBreakRender(oMapSubRender as MapObjects2.ClassBreaksRenderer);
                    oGroupRender.RenderList.Add(oClassBreakRender);
                }
                else if (oMapSubRender is MapObjects2.LabelRenderer)
                {
                    LabelRenderStruct oLabelRender = this.ExportLabelRender(oMapSubRender as MapObjects2.LabelRenderer);
                    oGroupRender.RenderList.Add(oLabelRender);
                }

                iIndex++;

                try
                {
                    oMapSubRender = render.get_Renderer(iIndex);
                }
                catch
                {
                    break;
                }
            }


            return(oGroupRender);
        }
Beispiel #3
0
        private ValueRenderStruct ExportValueRender(MapObjects2.ValueMapRenderer render)
        {
            ValueRenderStruct oValueRender = new ValueRenderStruct();

            this.DeconvertSymbol(render.DefaultSymbol, oValueRender.DefaultSymbol);

            oValueRender.Field         = render.Field;
            oValueRender.RotationField = render.RotationField;
            oValueRender.ScaleField    = render.ScalingField;
            oValueRender.SymbolType    = (short)render.SymbolType;
            oValueRender.Tag           = render.Tag;
            oValueRender.UseDefault    = render.UseDefault;
            oValueRender.ValueCount    = render.ValueCount;

            short iIndex = 0;

            MapObjects2.Symbol oMapSymbol = render.get_Symbol(iIndex);

            while (oMapSymbol != null)
            {
                SymbolStruct oSymbol = new SymbolStruct();
                this.DeconvertSymbol(oMapSymbol, oSymbol);
                oValueRender.SymbolList.Add(oSymbol);
                oValueRender.ValueList.Add(render.get_Value(iIndex));

                iIndex++;

                try
                {
                    oMapSymbol = render.get_Symbol(iIndex);
                }
                catch
                {
                    break;
                }
            }

            return(oValueRender);
        }