예제 #1
0
        static MapWindowManager()
        {
            GlobalSettings gs = new GlobalSettings();

            if (Global.Settings?.BingAPIKey.Length > 0)
            {
                gs.BingApiKey = Global.Settings.BingAPIKey;
            }

            TileProviders.Add(0, "OpenStreetMap");
            TileProviders.Add(1, "OpenCycleMap");
            TileProviders.Add(2, "OpenTransportMap");

            if (Global.Settings?.BingAPIKey.Length > 0)
            {
                TileProviders.Add(3, "BingMaps");
                TileProviders.Add(4, "BingSatellite");
                TileProviders.Add(5, "BingHybrid");
            }
            TileProviders.Add(6, "GoogleMaps");
            //TileProviders.Add(7, "GoogleSatellite");
            //TileProviders.Add(8, "GoogleHybrid");
            TileProviders.Add(9, "GoogleTerrain");
            //TileProviders.Add(10, "HereMaps");
            //TileProviders.Add(11, "HereSatellite");
            //TileProviders.Add(12, "HereHybrid");
            //TileProviders.Add(13, "HereTerrain");
            //TileProviders.Add(21, "Rosreestr");
            TileProviders.Add(22, "OpenHumanitarianMap");
            //TileProviders.Add(23, "MapQuestAerial");
        }
예제 #2
0
 public TileProviderList(TileProviders providers)
 {
     _providers = providers;
     if (providers == null)
     {
         throw new NullReferenceException("Internal style reference is null.");
     }
 }
예제 #3
0
 internal TileProviderInfo(TileProviders providers, int index)
 {
     _providers = providers;
     _index     = index;
     if (providers == null)
     {
         throw new NullReferenceException("Internal reference is null.");
     }
     if (index < 0 || index >= providers.Count)
     {
         throw new IndexOutOfRangeException("Invalid index of tile provider.");
     }
 }
예제 #4
0
 private void bunifuFlatButton2_Click(object sender, EventArgs e)
 {
     try
     {
         providers  = MainMap.Tiles.Providers;
         providerid = (int)tkTileProvider.ProviderCustom + 102;
         providers.Add(providerid, "GoogleTransit", "http://127.0.0.1/GoogleTransit/z{zoom}/{y}/{x}.png", tkTileProjection.SphericalMercator, 0, 20);
         MainMap.Tiles.ProviderId = providerid;
     }
     catch
     {
         MessageBox.Show("The server was not found");
         return;
     }
 }
예제 #5
0
파일: Main.cs 프로젝트: orapow/yt
        private void Main_Load(object sender, EventArgs e)
        {
            map1.Projection = tkMapProjection.PROJECTION_WGS84;
            TileProviders providers = map1.Tiles.Providers;

            //int providerId = (int)tkTileProvider.ProviderCustom + 1;    // (1024 + 1) should be unique across application runs in case disk caching is used
            providers.Add(
                1025,
                "矢量",
                "http://webgis.591map.net/tiler/tdt-vec_w-{switch:1,2,3,4,5,6}-{x}-{y}-{zoom}.html",
                0,
                1,
                19);
            providers.Add(
                1026,
                "影像",
                "http://webgis.591map.net/tiler/tdt-img_w-{switch:1,2,3,4,5,6}-{x}-{y}-{zoom}.html",
                0,
                1,
                19);
            map1.Tiles.ProviderId = 1025;// = tkTileProvider.ProviderCustom;
            map1.KnownExtents     = tkKnownExtents.keChina;
            map1.Refresh();
        }