Exemple #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (!this.Page.IsPostBack)
            {
                if (this._data.Value != null && !string.IsNullOrEmpty(this._data.Value.ToString()))
                {
                    MapState mapVal = MapState.Deserialize(this._data.Value.ToString());

                    if (mapVal != null)
                    {
                        mapVal.SingleLocation    = value.SingleLocation;
                        mapVal.Language          = value.Language;
                        mapVal.Width             = value.Width;
                        mapVal.Height            = value.Height;
                        mapVal.DrawingTools      = value.DrawingTools;
                        mapVal.SearchBox         = value.SearchBox;
                        mapVal.RichtextEditor    = value.RichtextEditor;
                        mapVal.ZoomControl       = value.ZoomControl;
                        mapVal.PanControl        = value.PanControl;
                        mapVal.StreetViewControl = value.StreetViewControl;
                        mapVal.ScaleControl      = value.ScaleControl;

                        this.ctlValue.Value = mapVal.ToJSON();
                    }
                }
                else
                {
                    this.ctlValue.Value = value.ToJSON();
                }
            }
        }
Exemple #2
0
 public static MapState GetPropertyValueAsMapState(this IPublishedContent content, string property)
 {
     return(MapState.Deserialize(content.GetPropertyValueAsString(property)));
 }