/// <summary> /// Generates map code and registers Google javascript files. /// </summary> public void LoadMap() { #region "Map properties" // Set map properties CMSMapProperties mp = new CMSMapProperties(); mp.EnableMapDragging = this.EnableMapDragging; mp.ShowScaleControl = this.ShowScaleControl; mp.EnableServerProcessing = this.EnableServerProcessing; mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowMapTypeControl = this.ShowMapTypeControl; mp.NavigationControlType = this.NavigationControlType; mp.Latitude = this.Latitude; mp.Longitude = this.Longitude; mp.ZoomScale = this.ZoomScale; mp.Location = this.Location; mp.ToolTip = this.ToolTip; mp.IconURL = this.IconURL; mp.MapType = this.MapType; mp.Content = this.Content; mp.Height = this.Height; mp.Scale = this.Scale; mp.Width = this.Width; mp.MapId = this.ClientID; #endregion // Load map this.ltlGoogleMap.Text = BasicGoogleMaps.GenerateMap(mp, this.CacheMinutes, this.CacheItemName, this.InstanceGUID); }
/// <summary> /// Generates map code and registers Bing javascript files. /// </summary> public void LoadMap() { #region "Map properties" // Set map properties CMSMapProperties mp = new CMSMapProperties(); mp.EnableMapDragging = EnableMapDragging; mp.ShowScaleControl = ShowScaleControl; mp.EnableServerProcessing = EnableServerProcessing; mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.ShowNavigationControl = ShowNavigationControl; mp.IconURL = IconURL; mp.MapKey = MapKey; mp.Latitude = Latitude; mp.Longitude = Longitude; mp.ZoomScale = ZoomScale; mp.Location = Location; mp.ToolTip = ToolTip; mp.MapType = MapType; mp.Content = Content; mp.Height = Height; mp.Scale = Scale; mp.Width = Width; mp.MapId = ClientID; mp.Page = Page; #endregion // Load map ltlBingMap.Text = BasicBingMaps.GenerateMap(mp, CacheMinutes, CacheItemName, InstanceGUID); }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (StopProcessing) { // Do nothing ucBingMap.Visible = false; } else { #region "Data source properties" // Set Documents data source control ucDocumentSource.Path = Path; ucDocumentSource.ClassNames = ClassNames; ucDocumentSource.CombineWithDefaultCulture = CombineWithDefaultCulture; ucDocumentSource.CultureCode = CultureCode; ucDocumentSource.MaxRelativeLevel = MaxRelativeLevel; ucDocumentSource.OrderBy = OrderBy; ucDocumentSource.SelectOnlyPublished = SelectOnlyPublished; ucDocumentSource.SelectTopN = SelectTopN; ucDocumentSource.SiteName = SiteName; ucDocumentSource.WhereCondition = WhereCondition; ucDocumentSource.FilterOutDuplicates = FilterOutDuplicates; ucDocumentSource.CheckPermissions = CheckPermissions; ucDocumentSource.RelationshipName = RelationshipName; ucDocumentSource.RelationshipWithNodeGuid = RelationshipWithNodeGUID; ucDocumentSource.RelatedNodeIsOnTheLeftSide = RelatedNodeIsOnTheLeftSide; ucDocumentSource.CacheDependencies = CacheDependencies; ucDocumentSource.CacheMinutes = CacheMinutes; ucDocumentSource.CacheItemName = CacheItemName; ucDocumentSource.LoadCurrentPageOnly = LoadCurrentPageOnly; #endregion #region "Bing map caching options" // Set caching options if server processing is enabled if (ucDocumentSource != null && EnableServerProcessing) { ucBingMap.CacheItemName = ucDocumentSource.CacheItemName; ucBingMap.CacheMinutes = ucDocumentSource.CacheMinutes; // Cache depends on data source and properties of web part ucBingMap.CacheDependencies = CacheHelper.GetCacheDependencies(CacheDependencies, ucDocumentSource.GetDefaultCacheDependencies()); } #endregion #region "Map properties" // Set BasicBingMaps control CMSMapProperties mp = new CMSMapProperties(); mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.EnableMapDragging = EnableMapDragging; mp.EnableServerProcessing = EnableServerProcessing; mp.Height = Height; mp.Latitude = Latitude; mp.LatitudeField = LatitudeField; mp.Location = DefaultLocation; mp.LocationField = LocationField; mp.Longitude = Longitude; mp.LongitudeField = LongitudeField; mp.MapId = ClientID; mp.MapKey = MapKey; mp.MapType = MapType; mp.Scale = Scale; mp.ShowNavigationControl = ShowNavigationControl; mp.ShowScaleControl = ShowScaleControl; mp.ToolTipField = ToolTipField; mp.IconField = IconField; mp.Width = Width; mp.ZoomScale = ZoomScale; ucBingMap.DataBindByDefault = false; ucBingMap.MapProperties = mp; ucBingMap.ItemTemplate = CMSDataProperties.LoadTransformation(this, TransformationName); ucBingMap.MainScriptPath = "~/CMSWebParts/Maps/Documents/BingMaps_files/BingMaps.js"; ucBingMap.HideControlForZeroRows = HideControlForZeroRows; if (!String.IsNullOrEmpty(ZeroRowsText)) { ucBingMap.ZeroRowsText = ZeroRowsText; } #endregion if (reloadData) { ucDocumentSource.DataSource = null; } // Connects Bing map with data source ucBingMap.DataSource = ucDocumentSource.DataSource; ucBingMap.RelatedData = ucDocumentSource.RelatedData; if (HasData) { ucBingMap.DataBind(); } } }
/// <summary> /// Generates map code and registers Bing javascript files. /// </summary> public void LoadMap() { #region "Map properties" // Set map properties CMSMapProperties mp = new CMSMapProperties(); mp.EnableMapDragging = EnableMapDragging; mp.ShowScaleControl = ShowScaleControl; mp.EnableServerProcessing = EnableServerProcessing; mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.ShowNavigationControl = ShowNavigationControl; mp.IconURL = IconURL; mp.MapKey = MapKey; mp.Latitude = Latitude; mp.Longitude = Longitude; mp.ZoomScale = ZoomScale; mp.Location = Location; mp.ToolTip = ToolTip; mp.MapType = MapType; mp.Content = Content; mp.Height = Height; mp.Scale = Scale; mp.Width = Width; mp.MapId = ClientID; mp.Page = Page; #endregion // Load map ltlBingMap.Text = BasicBingMaps.GenerateMap(mp, CacheMinutes, CacheItemName, InstanceGUID); }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (this.StopProcessing) { // Do nothing ucGoogleMap.Visible = false; } else { #region "Data source properties" // Set Documents data source control ucDocumentSource.Path = this.Path; ucDocumentSource.ClassNames = this.ClassNames; ucDocumentSource.CombineWithDefaultCulture = this.CombineWithDefaultCulture; ucDocumentSource.CultureCode = this.CultureCode; ucDocumentSource.MaxRelativeLevel = this.MaxRelativeLevel; ucDocumentSource.OrderBy = this.OrderBy; ucDocumentSource.SelectOnlyPublished = this.SelectOnlyPublished; ucDocumentSource.SelectTopN = this.SelectTopN; ucDocumentSource.SiteName = this.SiteName; ucDocumentSource.WhereCondition = this.WhereCondition; ucDocumentSource.FilterOutDuplicates = this.FilterOutDuplicates; ucDocumentSource.CheckPermissions = this.CheckPermissions; ucDocumentSource.RelationshipName = this.RelationshipName; ucDocumentSource.RelationshipWithNodeGuid = this.RelationshipWithNodeGUID; ucDocumentSource.RelatedNodeIsOnTheLeftSide = this.RelatedNodeIsOnTheLeftSide; ucDocumentSource.CacheDependencies = this.CacheDependencies; ucDocumentSource.CacheMinutes = this.CacheMinutes; ucDocumentSource.CacheItemName = this.CacheItemName; #endregion #region "Google map caching options" // Set caching options if server processing is enabled if (this.ucDocumentSource != null && this.EnableServerProcessing) { this.ucGoogleMap.CacheItemName = this.ucDocumentSource.CacheItemName; if (this.ucDocumentSource.CacheMinutes <= 0) { // If zero or less, get from the site settings this.ucGoogleMap.CacheMinutes = SettingsKeyProvider.GetIntValue(CurrentSiteName + ".CMSCacheMinutes"); } else { this.ucGoogleMap.CacheMinutes = this.ucDocumentSource.CacheMinutes; } // Cache depends on data source and properties of web part this.ucGoogleMap.CacheDependencies = CacheHelper.GetCacheDependencies(this.CacheDependencies, this.ucDocumentSource.GetDefaultCacheDependendencies()); } #endregion #region "Map properties" // Set BasicGoogleMaps control CMSMapProperties mp = new CMSMapProperties(); mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.EnableMapDragging = this.EnableMapDragging; mp.EnableServerProcessing = this.EnableServerProcessing; mp.Height = this.Height; mp.Latitude = this.Latitude; mp.LatitudeField = this.LatitudeField; mp.Location = this.DefaultLocation; mp.LocationField = this.LocationField; mp.Longitude = this.Longitude; mp.LongitudeField = this.LongitudeField; mp.IconField = this.IconField; mp.MapId = this.ClientID; mp.MapType = this.MapType; mp.NavigationControlType = this.NavigationControlType; mp.Scale = this.Scale; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowScaleControl = this.ShowScaleControl; mp.ShowMapTypeControl = this.ShowMapTypeControl; mp.ToolTipField = this.ToolTipField; mp.Width = this.Width; mp.ZoomScale = this.ZoomScale; ucGoogleMap.DataBindByDefault = false; ucGoogleMap.MapProperties = mp; ucGoogleMap.ItemTemplate = CMSDataProperties.LoadTransformation(this, TransformationName, false); ucGoogleMap.MainScriptPath = "~/CMSWebParts/Maps/Documents/GoogleMaps_files/GoogleMaps.js"; ucGoogleMap.HideControlForZeroRows = this.HideControlForZeroRows; if (!String.IsNullOrEmpty(this.ZeroRowsText)) { ucGoogleMap.ZeroRowsText = this.ZeroRowsText; } #endregion if (reloadData) { ucDocumentSource.DataSource = null; } // Connects Google map with data source ucGoogleMap.DataSource = ucDocumentSource.DataSource; ucGoogleMap.RelatedData = ucDocumentSource.RelatedData; if (HasData) { ucGoogleMap.DataBind(); } } }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (!StopProcessing) { #region "Caching options" // Set caching options if server processing is enabled if (DataSourceControl != null && EnableServerProcessing) { BasicBingMaps.CacheItemName = DataSourceControl.CacheItemName; BasicBingMaps.CacheMinutes = DataSourceControl.CacheMinutes; // Cache depends only on data source and properties of data source web part string cacheDependencies = CacheHelper.GetCacheDependencies(DataSourceControl.CacheDependencies, DataSourceControl.GetDefaultCacheDependencies()); // All view modes, except LiveSite mode if (PortalContext.ViewMode != ViewModeEnum.LiveSite) { // Cache depends on data source, properties of data source web part and properties of BasicBingMaps web part cacheDependencies += "webpartinstance|" + InstanceGUID.ToString().ToLowerCSafe(); } BasicBingMaps.CacheDependencies = cacheDependencies; } #endregion #region "Map properties" CMSMapProperties mp = new CMSMapProperties(); mp.Location = DefaultLocation; mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.EnableMapDragging = EnableMapDragging; mp.Height = Height; mp.Width = Width; mp.EnableServerProcessing = EnableServerProcessing; mp.Longitude = Longitude; mp.Latitude = Latitude; mp.LatitudeField = LatitudeField; mp.LongitudeField = LongitudeField; mp.LocationField = LocationField; mp.MapKey = MapKey; mp.MapType = MapType; mp.Scale = Scale; mp.ShowNavigationControl = ShowNavigationControl; mp.ShowScaleControl = ShowScaleControl; mp.ToolTipField = ToolTipField; mp.IconField = IconField; mp.ZoomScale = ZoomScale; mp.MapId = ClientID; #endregion BasicBingMaps.MapProperties = mp; BasicBingMaps.HideControlForZeroRows = HideControlForZeroRows; BasicBingMaps.DataBindByDefault = false; BasicBingMaps.MainScriptPath = "~/CMSWebParts/Maps/Basic/BasicBingMaps_files/BingMaps.js"; // Add basic maps control to the filter collection EnsureFilterControl(); if (!String.IsNullOrEmpty(ZeroRowsText)) { BasicBingMaps.ZeroRowsText = ZeroRowsText; } } }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (!StopProcessing) { #region "Caching options" // Set caching options if server processing is enabled if (DataSourceControl != null && EnableServerProcessing) { BasicGoogleMaps.CacheItemName = DataSourceControl.CacheItemName; BasicGoogleMaps.CacheMinutes = DataSourceControl.CacheMinutes; // Cache depends only on data source and properties of data source web part string cacheDependencies = CacheHelper.GetCacheDependencies(DataSourceControl.CacheDependencies, DataSourceControl.GetDefaultCacheDependencies()); // All view modes, except LiveSite mode if (PortalContext.ViewMode != ViewModeEnum.LiveSite) { // Cache depends on data source, properties of data source web part and properties of BasicGoogleMaps web part cacheDependencies += "webpartinstance|" + InstanceGUID.ToString().ToLowerCSafe(); } BasicGoogleMaps.CacheDependencies = cacheDependencies; } #endregion #region "Map properties" CMSMapProperties mp = new CMSMapProperties(); mp.Location = DefaultLocation; mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.EnableMapDragging = EnableMapDragging; mp.Height = Height; mp.Width = Width; mp.EnableServerProcessing = EnableServerProcessing; mp.Longitude = Longitude; mp.Latitude = Latitude; mp.LatitudeField = LatitudeField; mp.LongitudeField = LongitudeField; mp.LocationField = LocationField; mp.MapType = MapType; mp.ZoomControlType = ZoomControlType; mp.Scale = Scale; mp.ShowZoomControl = ShowZoomControl; mp.ShowPanControl = ShowPanControl; mp.ShowStreetViewControl = ShowStreetViewControl; mp.ShowScaleControl = ShowScaleControl; mp.ShowMapTypeControl = ShowMapTypeControl; mp.ToolTipField = ToolTipField; mp.IconField = IconField; mp.ZoomScale = ZoomScale; mp.MapId = ClientID; #endregion BasicGoogleMaps.MapProperties = mp; BasicGoogleMaps.HideControlForZeroRows = HideControlForZeroRows; BasicGoogleMaps.DataBindByDefault = false; BasicGoogleMaps.MainScriptPath = "~/CMSWebParts/Maps/Basic/BasicGoogleMaps_files/GoogleMaps.js"; // Add basic maps control to the filter collection EnsureFilterControl(); if (!String.IsNullOrEmpty(ZeroRowsText)) { BasicGoogleMaps.ZeroRowsText = ZeroRowsText; } } }
/// <summary> /// Generates map code and registers Google javascript files. /// </summary> public void LoadMap() { #region "Map properties" // Set map properties CMSMapProperties mp = new CMSMapProperties(); mp.EnableMapDragging = this.EnableMapDragging; mp.ShowScaleControl = this.ShowScaleControl; mp.EnableServerProcessing = this.EnableServerProcessing; mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowMapTypeControl = this.ShowMapTypeControl; mp.NavigationControlType = this.NavigationControlType; mp.Latitude = this.Latitude; mp.Longitude = this.Longitude; mp.ZoomScale = this.ZoomScale; mp.Location = this.Location; mp.ToolTip = this.ToolTip; mp.IconURL = this.IconURL; mp.MapType = this.MapType; mp.Content = this.Content; mp.Height = this.Height; mp.Scale = this.Scale; mp.Width = this.Width; mp.MapId = this.ClientID; #endregion // Load map this.ltlGoogleMap.Text = BasicGoogleMaps.GenerateMap(mp, this.CacheMinutes, this.CacheItemName, this.InstanceGUID); }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (!this.StopProcessing) { #region "Caching options" // Set caching options if server processing is enabled if (this.DataSourceControl != null && this.EnableServerProcessing) { this.BasicBingMaps.CacheItemName = this.DataSourceControl.CacheItemName; if (this.DataSourceControl.CacheMinutes <= 0) { // If zero or less, get from the site settings this.BasicBingMaps.CacheMinutes = SettingsKeyProvider.GetIntValue(CurrentSiteName + ".CMSCacheMinutes"); } else { this.BasicBingMaps.CacheMinutes = this.DataSourceControl.CacheMinutes; } // Cache depends only on data source and properties of data source web part string cacheDependencies = CacheHelper.GetCacheDependencies(this.DataSourceControl.CacheDependencies, this.DataSourceControl.GetDefaultCacheDependendencies()); // All view modes, except LiveSite mode if (CMSContext.ViewMode != ViewModeEnum.LiveSite) { // Cache depends on data source, properties of data source web part and properties of BasicBingMaps web part cacheDependencies += "webpartinstance|" + this.InstanceGUID.ToString().ToLower(); } this.BasicBingMaps.CacheDependencies = cacheDependencies; } #endregion #region "Map properties" CMSMapProperties mp = new CMSMapProperties(); mp.Location = this.DefaultLocation; mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.EnableMapDragging = this.EnableMapDragging; mp.Height = this.Height; mp.Width = this.Width; mp.EnableServerProcessing = this.EnableServerProcessing; mp.Longitude = this.Longitude; mp.Latitude = this.Latitude; mp.LatitudeField = this.LatitudeField; mp.LongitudeField = this.LongitudeField; mp.LocationField = this.LocationField; mp.MapKey = this.MapKey; mp.MapType = this.MapType; mp.Scale = this.Scale; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowScaleControl = this.ShowScaleControl; mp.ToolTipField = this.ToolTipField; mp.IconField = this.IconField; mp.ZoomScale = this.ZoomScale; mp.MapId = this.ClientID; #endregion this.BasicBingMaps.MapProperties = mp; this.BasicBingMaps.HideControlForZeroRows = this.HideControlForZeroRows; this.BasicBingMaps.DataBindByDefault = false; this.BasicBingMaps.MainScriptPath = "~/CMSWebParts/Maps/Basic/BasicBingMaps_files/BingMaps.js"; // Add basic maps control to the filter collection EnsureFilterControl(); if (!String.IsNullOrEmpty(this.ZeroRowsText)) { this.BasicBingMaps.ZeroRowsText = this.ZeroRowsText; } } }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (!this.StopProcessing) { #region "Caching options" // Set caching options if server processing is enabled if (this.DataSourceControl != null && this.EnableServerProcessing) { this.BasicBingMaps.CacheItemName = this.DataSourceControl.CacheItemName; if (this.DataSourceControl.CacheMinutes <= 0) { // If zero or less, get from the site settings this.BasicBingMaps.CacheMinutes = SettingsKeyProvider.GetIntValue(CurrentSiteName + ".CMSCacheMinutes"); } else { this.BasicBingMaps.CacheMinutes = this.DataSourceControl.CacheMinutes; } // Cache depends only on data source and properties of data source web part string cacheDependencies = CacheHelper.GetCacheDependencies(this.DataSourceControl.CacheDependencies, this.DataSourceControl.GetDefaultCacheDependendencies()); // All view modes, except LiveSite mode if (CMSContext.ViewMode != ViewModeEnum.LiveSite) { // Cache depends on data source, properties of data source web part and properties of BasicBingMaps web part cacheDependencies += "webpartinstance|" + this.InstanceGUID.ToString().ToLower(); } this.BasicBingMaps.CacheDependencies = cacheDependencies; } #endregion #region "Map properties" CMSMapProperties mp = new CMSMapProperties(); mp.Location = this.DefaultLocation; mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.EnableMapDragging = this.EnableMapDragging; mp.Height = this.Height; mp.Width = this.Width; mp.EnableServerProcessing = this.EnableServerProcessing; mp.Longitude = this.Longitude; mp.Latitude = this.Latitude; mp.LatitudeField = this.LatitudeField; mp.LongitudeField = this.LongitudeField; mp.LocationField = this.LocationField; mp.MapKey = this.MapKey; mp.MapType = this.MapType; mp.Scale = this.Scale; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowScaleControl = this.ShowScaleControl; mp.ToolTipField = this.ToolTipField; mp.IconField = this.IconField; mp.ZoomScale = this.ZoomScale; mp.MapId = this.ClientID; #endregion this.BasicBingMaps.MapProperties = mp; this.BasicBingMaps.HideControlForZeroRows = this.HideControlForZeroRows; this.BasicBingMaps.DataBindByDefault = false; this.BasicBingMaps.MainScriptPath = "~/CMSWebParts/Maps/Basic/BasicBingMaps_files/BingMaps.js"; // Add basic maps control to the filter collection EnsureFilterControl(); if (!String.IsNullOrEmpty(this.ZeroRowsText)) { this.BasicBingMaps.ZeroRowsText = this.ZeroRowsText; } } }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (StopProcessing) { // Do nothing ucGoogleMap.Visible = false; } else { #region "Data source properties" // Set Documents data source control ucDocumentSource.Path = Path; ucDocumentSource.ClassNames = ClassNames; ucDocumentSource.CombineWithDefaultCulture = CombineWithDefaultCulture; ucDocumentSource.CultureCode = CultureCode; ucDocumentSource.MaxRelativeLevel = MaxRelativeLevel; ucDocumentSource.OrderBy = OrderBy; ucDocumentSource.SelectOnlyPublished = SelectOnlyPublished; ucDocumentSource.SelectTopN = SelectTopN; ucDocumentSource.SiteName = SiteName; ucDocumentSource.WhereCondition = WhereCondition; ucDocumentSource.FilterOutDuplicates = FilterOutDuplicates; ucDocumentSource.CheckPermissions = CheckPermissions; ucDocumentSource.RelationshipName = RelationshipName; ucDocumentSource.RelationshipWithNodeGuid = RelationshipWithNodeGUID; ucDocumentSource.RelatedNodeIsOnTheLeftSide = RelatedNodeIsOnTheLeftSide; ucDocumentSource.CacheDependencies = CacheDependencies; ucDocumentSource.CacheMinutes = CacheMinutes; ucDocumentSource.CacheItemName = CacheItemName; ucDocumentSource.LoadCurrentPageOnly = LoadCurrentPageOnly; #endregion #region "Google map caching options" // Set caching options if server processing is enabled if (ucDocumentSource != null && EnableServerProcessing) { ucGoogleMap.CacheItemName = ucDocumentSource.CacheItemName; ucGoogleMap.CacheMinutes = ucDocumentSource.CacheMinutes; // Cache depends on data source and properties of web part ucGoogleMap.CacheDependencies = CacheHelper.GetCacheDependencies(CacheDependencies, ucDocumentSource.GetDefaultCacheDependencies()); } #endregion #region "Map properties" // Set BasicGoogleMaps control CMSMapProperties mp = new CMSMapProperties(); mp.EnableKeyboardShortcuts = EnableKeyboardShortcuts; mp.EnableMapDragging = EnableMapDragging; mp.EnableServerProcessing = EnableServerProcessing; mp.Height = Height; mp.Latitude = Latitude; mp.LatitudeField = LatitudeField; mp.Location = DefaultLocation; mp.LocationField = LocationField; mp.Longitude = Longitude; mp.LongitudeField = LongitudeField; mp.IconField = IconField; mp.MapId = ClientID; mp.MapType = MapType; mp.ZoomControlType = ZoomControlType; mp.Scale = Scale; mp.ShowScaleControl = ShowScaleControl; mp.ShowMapTypeControl = ShowMapTypeControl; mp.ToolTipField = ToolTipField; mp.Width = Width; mp.ZoomScale = ZoomScale; mp.ShowZoomControl = ShowZoomControl; mp.ShowPanControl = ShowPanControl; mp.ShowStreetViewControl = ShowStreetViewControl; ucGoogleMap.DataBindByDefault = false; ucGoogleMap.MapProperties = mp; ucGoogleMap.ItemTemplate = CMSDataProperties.LoadTransformation(this, TransformationName); ucGoogleMap.MainScriptPath = "~/CMSWebParts/Maps/Documents/GoogleMaps_files/GoogleMaps.js"; ucGoogleMap.HideControlForZeroRows = HideControlForZeroRows; if (!String.IsNullOrEmpty(ZeroRowsText)) { ucGoogleMap.ZeroRowsText = ZeroRowsText; } #endregion if (reloadData) { ucDocumentSource.DataSource = null; } // Connects Google map with data source ucGoogleMap.DataSource = ucDocumentSource.DataSource; ucGoogleMap.RelatedData = ucDocumentSource.RelatedData; if (HasData) { ucGoogleMap.DataBind(); } } }
/// <summary> /// Initializes the control properties. /// </summary> protected void SetupControl() { if (this.StopProcessing) { // Do nothing ucGoogleMap.Visible = false; } else { #region "Data source properties" // Set Documents data source control ucDocumentSource.Path = this.Path; ucDocumentSource.ClassNames = this.ClassNames; ucDocumentSource.CombineWithDefaultCulture = this.CombineWithDefaultCulture; ucDocumentSource.CultureCode = this.CultureCode; ucDocumentSource.MaxRelativeLevel = this.MaxRelativeLevel; ucDocumentSource.OrderBy = this.OrderBy; ucDocumentSource.SelectOnlyPublished = this.SelectOnlyPublished; ucDocumentSource.SelectTopN = this.SelectTopN; ucDocumentSource.SiteName = this.SiteName; ucDocumentSource.WhereCondition = this.WhereCondition; ucDocumentSource.FilterOutDuplicates = this.FilterOutDuplicates; ucDocumentSource.CheckPermissions = this.CheckPermissions; ucDocumentSource.RelationshipName = this.RelationshipName; ucDocumentSource.RelationshipWithNodeGuid = this.RelationshipWithNodeGUID; ucDocumentSource.RelatedNodeIsOnTheLeftSide = this.RelatedNodeIsOnTheLeftSide; ucDocumentSource.CacheDependencies = this.CacheDependencies; ucDocumentSource.CacheMinutes = this.CacheMinutes; ucDocumentSource.CacheItemName = this.CacheItemName; #endregion #region "Google map caching options" // Set caching options if server processing is enabled if (this.ucDocumentSource != null && this.EnableServerProcessing) { this.ucGoogleMap.CacheItemName = this.ucDocumentSource.CacheItemName; if (this.ucDocumentSource.CacheMinutes <= 0) { // If zero or less, get from the site settings this.ucGoogleMap.CacheMinutes = SettingsKeyProvider.GetIntValue(CurrentSiteName + ".CMSCacheMinutes"); } else { this.ucGoogleMap.CacheMinutes = this.ucDocumentSource.CacheMinutes; } // Cache depends on data source and properties of web part this.ucGoogleMap.CacheDependencies = CacheHelper.GetCacheDependencies(this.CacheDependencies, this.ucDocumentSource.GetDefaultCacheDependendencies()); } #endregion #region "Map properties" // Set BasicGoogleMaps control CMSMapProperties mp = new CMSMapProperties(); mp.EnableKeyboardShortcuts = this.EnableKeyboardShortcuts; mp.EnableMapDragging = this.EnableMapDragging; mp.EnableServerProcessing = this.EnableServerProcessing; mp.Height = this.Height; mp.Latitude = this.Latitude; mp.LatitudeField = this.LatitudeField; mp.Location = this.DefaultLocation; mp.LocationField = this.LocationField; mp.Longitude = this.Longitude; mp.LongitudeField = this.LongitudeField; mp.IconField = this.IconField; mp.MapId = this.ClientID; mp.MapType = this.MapType; mp.NavigationControlType = this.NavigationControlType; mp.Scale = this.Scale; mp.ShowNavigationControl = this.ShowNavigationControl; mp.ShowScaleControl = this.ShowScaleControl; mp.ShowMapTypeControl = this.ShowMapTypeControl; mp.ToolTipField = this.ToolTipField; mp.Width = this.Width; mp.ZoomScale = this.ZoomScale; ucGoogleMap.DataBindByDefault = false; ucGoogleMap.MapProperties = mp; ucGoogleMap.ItemTemplate = CMSDataProperties.LoadTransformation(this, TransformationName, false); ucGoogleMap.MainScriptPath = "~/CMSWebParts/Maps/Documents/GoogleMaps_files/GoogleMaps.js"; ucGoogleMap.HideControlForZeroRows = this.HideControlForZeroRows; if (!String.IsNullOrEmpty(this.ZeroRowsText)) { ucGoogleMap.ZeroRowsText = this.ZeroRowsText; } #endregion if (reloadData) { ucDocumentSource.DataSource = null; } // Connects Google map with data source ucGoogleMap.DataSource = ucDocumentSource.DataSource; ucGoogleMap.RelatedData = ucDocumentSource.RelatedData; if (HasData) { ucGoogleMap.DataBind(); } } }