Ejemplo n.º 1
0
 private void OnDataError(UnityTile tile, Mapbox.Map.VectorTile vectorTile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         _tilesWaitingResponse.Remove(tile);
         if (tile.VectorDataState != TilePropertyState.Unregistered)
         {
             tile.SetVectorData(null);
             tile.VectorDataState = TilePropertyState.Error;
             OnErrorOccurred(e);
         }
     }
 }
 private void OnVectorDataRecieved(UnityTile tile, Mapbox.Map.VectorTile vectorTile)
 {
     if (tile != null)
     {
         _tilesWaitingResponse.Remove(tile);
         if (tile.VectorDataState != TilePropertyState.Unregistered)
         {
             tile.SetVectorData(vectorTile);
             // FIXME: we can make the request BEFORE getting a response from these!
             if (tile.HeightDataState == TilePropertyState.Loading ||
                 tile.RasterDataState == TilePropertyState.Loading)
             {
                 tile.OnHeightDataChanged += DataChangedHandler;
                 tile.OnRasterDataChanged += DataChangedHandler;
             }
             else
             {
                 CreateMeshes(tile);
             }
         }
     }
 }