Beispiel #1
0
        public static TileServerInfo CreateFromElement(XElement node)
        {
            TileServerInfo info = new TileServerInfo();

            info.Name = IO.GetAttributeCaseInsensitive(node, "name").Value;
            info.Path = IO.GetAttributeCaseInsensitive(node, "path").Value;
            info.TileXDim = System.Convert.ToInt32(IO.GetAttributeCaseInsensitive(node, "TileXDim").Value);
            info.TileYDim = System.Convert.ToInt32(IO.GetAttributeCaseInsensitive(node, "TileYDim").Value);
            info.FilePrefix = IO.GetAttributeCaseInsensitive(node, "FilePrefix").Value;
            info.FilePostfix = IO.GetAttributeCaseInsensitive(node, "FilePostfix").Value;
            info.Host = IO.GetAttributeCaseInsensitive(node, "host").Value;
            info.CoordSpaceName = IO.GetAttributeCaseInsensitive(node, "coordspacename").Value;

            return info;
        }
Beispiel #2
0
        public void AddTileserver(TileServerInfo info)
        {
            TileServerMapping mapping = new TileServerMapping(this, info.Name,
                                                              info.FilePrefix, info.FilePostfix,
                                                              info.TileXDim, info.TileYDim,
                                                              info.Host, info.CoordSpaceName, info.Path);

            mapping.AddLevel(1, 1024, 1024, "001");
            mapping.AddLevel(2, 512, 512, "002");
            mapping.AddLevel(4, 256, 256, "004");
            mapping.AddLevel(8, 128, 128, "008");
            mapping.AddLevel(16, 32, 32, "016");
            mapping.AddLevel(32, 16, 16, "032");
            mapping.AddLevel(64, 8, 8, "064");
            mapping.AddLevel(128, 4, 4, "128");
            WarpedTo.Add(mapping.Name, mapping);
            TilesetNames.Add(mapping.Name);
            VolumeTransformList.Add(mapping.Name);
            ChannelNames.Add(mapping.Name);
        }