예제 #1
0
        public List <Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation> GetGoogleMapZoomLinks()
        {
            XmlDocument vals = new XmlDocument();
            List <Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation> linklist = new List <Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation>();

            Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation link = new Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation();
            try
            {
                String Filepath = HttpContext.Current.Server.MapPath("~/Profile/Modules/NetworkMap/config.xml");
                vals.Load(Filepath);
                //vals.Load(Root.Domain + "/Profile/Modules/NetworkMap/config.xml");
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }

            foreach (XmlElement x in vals.SelectNodes("mapconfig/Zoom"))
            {
                link.Latitude     = x.SelectSingleNode("CenterLat").InnerText;
                link.Longitude    = x.SelectSingleNode("CenterLong").InnerText;
                link.ZoomLevel    = x.SelectSingleNode("ZoomLevel").InnerText;
                link.Label        = x.SelectSingleNode("Label").InnerText;
                link.SortOrder    = x.SelectSingleNode("SortOrder").InnerText;
                link.DefaultLevel = x.SelectSingleNode("DefaultLevel").InnerText;

                linklist.Add(link);
                link = new Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation();
            }
            linklist.Sort(delegate(Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation p1, Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation p2)
            {
                return(p1.SortOrder.CompareTo(p2.SortOrder));
            });
            return(linklist);
        }
예제 #2
0
        public List<Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation> GetGoogleMapZoomLinks()
        {
            XmlDocument vals = new XmlDocument();
            List<Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation> linklist = new List<Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation>();
            Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation link = new Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation();
            try
            {
                String Filepath = HttpContext.Current.Server.MapPath("~/Profile/Modules/NetworkMap/config.xml");
                vals.Load(Filepath);
                //vals.Load(Root.Domain + "/Profile/Modules/NetworkMap/config.xml");
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }

            foreach (XmlElement x in vals.SelectNodes("mapconfig/Zoom"))
            {

                link.Latitude = x.SelectSingleNode("CenterLat").InnerText;
                link.Longitude = x.SelectSingleNode("CenterLong").InnerText;
                link.ZoomLevel = x.SelectSingleNode("ZoomLevel").InnerText;
                link.Label = x.SelectSingleNode("Label").InnerText;
                link.SortOrder = x.SelectSingleNode("SortOrder").InnerText;
                link.DefaultLevel = x.SelectSingleNode("DefaultLevel").InnerText;

                linklist.Add(link);
                link = new Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation();
            }
            linklist.Sort(delegate(Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation p1, Profiles.Profile.Modules.NetworkMap.NetworkMap.GoogleMapLocation p2)
            {
                return p1.SortOrder.CompareTo(p2.SortOrder);
            });
            return linklist;
        }