/// <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> /// OnPreRender override. /// </summary> protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (!StopProcessing) { // Load map LoadMap(); // Register Bing javascript files BasicBingMaps.RegisterMapScripts(Page, ClientID, "~/CMSWebParts/Maps/Static/StaticBingMaps_files/BingMaps.js"); } }