private void GetDefaultStyle(out Style style, out StyleInstance styleInstance)
        {
            MapSpatialElementTemplate defaultTemplate = DefaultTemplate;

            if (defaultTemplate == null)
            {
                style         = null;
                styleInstance = null;
            }
            else
            {
                style         = defaultTemplate.Style;
                styleInstance = defaultTemplate.Instance.Style;
            }
        }
        protected void RenderSpatialElementTemplate(MapSpatialElementTemplate mapSpatialElementTemplate, ISpatialElement coreSpatialElement, bool ignoreBackgroundColor, bool hasScope)
        {
            ReportStringProperty toolTip = mapSpatialElementTemplate.ToolTip;
            string text = null;

            if (toolTip != null)
            {
                if (!toolTip.IsExpression)
                {
                    text = toolTip.Value;
                }
                else if (hasScope)
                {
                    text = mapSpatialElementTemplate.Instance.ToolTip;
                }
                if (text != null)
                {
                    text = (coreSpatialElement.ToolTip = VectorLayerMapper.AddPrefixToFieldNames(m_mapVectorLayer.Name, text));
                }
            }
            m_mapMapper.RenderActionInfo(mapSpatialElementTemplate.ActionInfo, text, coreSpatialElement, m_mapVectorLayer.Name, hasScope);
            ReportBoolProperty hidden = mapSpatialElementTemplate.Hidden;

            if (hidden != null)
            {
                if (!hidden.IsExpression)
                {
                    coreSpatialElement.Visible = !hidden.Value;
                }
                else if (hasScope)
                {
                    coreSpatialElement.Visible = !mapSpatialElementTemplate.Instance.Hidden;
                }
                else
                {
                    coreSpatialElement.Visible = true;
                }
            }
            else
            {
                coreSpatialElement.Visible = true;
            }
            ReportStringProperty label = mapSpatialElementTemplate.Label;

            if (label != null)
            {
                string text3 = "";
                if (!label.IsExpression)
                {
                    text3 = label.Value;
                }
                else if (hasScope)
                {
                    text3 = mapSpatialElementTemplate.Instance.Label;
                }
                if (text3 != null)
                {
                    coreSpatialElement.Text = VectorLayerMapper.AddPrefixToFieldNames(m_mapVectorLayer.Name, text3);
                }
            }
            ReportDoubleProperty offsetX = mapSpatialElementTemplate.OffsetX;
            double x = 0.0;

            if (offsetX != null)
            {
                if (!offsetX.IsExpression)
                {
                    x = offsetX.Value;
                }
                else if (hasScope)
                {
                    x = mapSpatialElementTemplate.Instance.OffsetX;
                }
                coreSpatialElement.Offset.X = x;
            }
            offsetX = mapSpatialElementTemplate.OffsetY;
            x       = 0.0;
            if (offsetX != null)
            {
                if (!offsetX.IsExpression)
                {
                    x = offsetX.Value;
                }
                else if (hasScope)
                {
                    x = mapSpatialElementTemplate.Instance.OffsetY;
                }
                coreSpatialElement.Offset.Y = x;
            }
            Style         style  = mapSpatialElementTemplate.Style;
            StyleInstance style2 = mapSpatialElementTemplate.Instance.Style;

            RenderStyle(style, style2, coreSpatialElement, ignoreBackgroundColor, hasScope);
        }