Beispiel #1
0
        public void PrepareGoTile()
        {
            if (map != null)
            {
                goTile.useStreetnames = !map.labels.disabled;
                goTile.streetNames    = map.labels.streetNames;
            }

            if (goTile.useElevation)
            {
                if (!string.IsNullOrEmpty(demUrl()))
                {
                    GOTileData demData = new GOTileData(demUrl(), goTile, GOTileData.GODataType.DEM);
                    goTile.tileData.Add(demData);
                }
                if (!string.IsNullOrEmpty(normalsUrl()))
                {
                    GOTileData normalsData = new GOTileData(normalsUrl(), goTile, GOTileData.GODataType.Normals);
                    goTile.tileData.Add(normalsData);
                }
            }

            if (goTile.useSatelliteBackground && !string.IsNullOrEmpty(satelliteUrl()))
            {
                if (goTile.satellite4X)
                {
                    foreach (Vector2 tileC in goTile.tileCenter.subTiles(goTile.tileCoordinates))
                    {
                        GOTileData satelliteData = new GOTileData(satelliteUrl(tileC), goTile, GOTileData.GODataType.Satellite4X, tileC);
                        satelliteData.tileCoords = tileC;
                        goTile.tileData.Add(satelliteData);
                    }
                }
                else
                {
                    GOTileData satelliteData = new GOTileData(satelliteUrl(), goTile, GOTileData.GODataType.Satellite);
                    goTile.tileData.Add(satelliteData);
                }
            }

            if (goTile.navmeshSettings.buildNavmeshSurfaces)
            {
                AddNavmesh();
            }

            GOTileData vectorData = new GOTileData(vectorUrl(), goTile, GOTileData.GODataType.VectorPBF);

            goTile.tileData.Add(vectorData);
        }
Beispiel #2
0
 public Texture2D getSatelliteTexture()
 {
     if (satellite4X)
     {
         List <GOTileData> dl = new List <GOTileData> ();
         foreach (GOTileData data in tileData)
         {
             if (data.type == GOTileData.GODataType.Satellite4X)
             {
                 dl.Add(data);
             }
         }
         return(GOTileData.MergeSatellite2X(dl));
     }
     else
     {
         return(getSatelliteData().ToTexture2D());
     }
 }