Beispiel #1
0
        private void _OnTileErrorHandler(object sender, TileErrorEventArgs e)
        {
            // check if request has been aborted: show warning not error
            if (e.Exceptions.Count > 0)
            {
                // 1. aborted is always the first exception
                //    additional exceptions are always caused by the request being aborted
                //    show all of them as warnings
                // 2. 'Unable to write data' is another exception associated
                //    with aborted requests: request finshed successfully but
                //    was aborted during filling of local buffer, also show as warning
                if (
                    e.Exceptions[0].Message.Contains("Request aborted") ||
                    e.Exceptions[0].Message.Equals("Unable to write data")
                    )
                {
                    Debug.LogWarning(printMessage(e.Exceptions, e));
                }
                else
                {
                }
            }

            if (OnTileError != null)
            {
                OnTileError.Invoke(e);
            }
        }
Beispiel #2
0
 private void OnDataError(UnityTile tile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         Progress--;
         tile.VectorDataState = TilePropertyState.Error;
     }
 }
 /// <summary>
 /// Method to be called when a tile error has occurred.
 /// </summary>
 /// <param name="e"><see cref="T:Mapbox.Map.TileErrorEventArgs"/> instance/</param>
 protected override void OnErrorOccurred(UnityTile tile, TileErrorEventArgs e)
 {
     base.OnErrorOccurred(tile, e);
     if (tile != null)
     {
         tile.RasterDataState = TilePropertyState.Error;
     }
 }
Beispiel #4
0
        private void Factory_OnTileError(object sender, TileErrorEventArgs e)
        {
            EventHandler <TileErrorEventArgs> handler = OnTileError;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 //merge this with OnErrorOccurred?
 protected virtual void OnDataError(UnityTile tile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         Progress--;
         tile.RasterDataState = TilePropertyState.Error;
         OnErrorOccurred(e);
     }
 }
        protected virtual void OnErrorOccurred(UnityTile tile, TileErrorEventArgs e)
        {
            EventHandler <TileErrorEventArgs> handler = OnTileError;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Beispiel #7
0
 private void OnDataError(UnityTile tile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         Progress--;
         tile.HeightDataState = TilePropertyState.Error;
         //strategy might want to act on this , i.e. flattening tile mesh on data fetching failed?
         Strategy.DataErrorOccurred(tile, e);
     }
 }
Beispiel #8
0
 private string printMessage(List <Exception> exceptions, TileErrorEventArgs e)
 {
     return(string.Format(
                "{0} Exception(s) caused on the tile. Tile ID:{1} Tile Type:{4}{2}{3}"
                , exceptions.Count
                , e.TileId
                , Environment.NewLine
                , string.Join(Environment.NewLine, exceptions.Select(ex => ex.Message).ToArray())
                , e.TileType
                ));
 }
 //merge this with OnErrorOccurred?
 protected virtual void OnDataError(UnityTile tile, RasterTile rasterTile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         if (tile.RasterDataState != TilePropertyState.Unregistered)
         {
             tile.RasterDataState = TilePropertyState.Error;
             _tilesWaitingResponse.Remove(tile);
             OnErrorOccurred(e);
         }
     }
 }
 private void OnDataError(UnityTile tile, RawPngRasterTile rawTile, TileErrorEventArgs e)
 {
     if (tile != null)
     {
         _tilesWaitingResponse.Remove(tile);
         if (tile.HeightDataState != TilePropertyState.Unregistered)
         {
             Strategy.DataErrorOccurred(tile, e);
             tile.HeightDataState = TilePropertyState.Error;
         }
     }
 }
 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);
         }
     }
 }
 /// <summary>
 /// Method to be called when a tile error has occurred.
 /// </summary>
 /// <param name="e"><see cref="T:Mapbox.Map.TileErrorEventArgs"/> instance/</param>
 protected override void OnErrorOccurred(UnityTile tile, TileErrorEventArgs e)
 {
     base.OnErrorOccurred(tile, e);
 }
Beispiel #13
0
 /// <summary>
 /// Method to be called when a tile error has occurred.
 /// </summary>
 /// <param name="e"><see cref="T:Mapbox.Map.TileErrorEventArgs"/> instance/</param>
 protected override void OnErrorOccurred(TileErrorEventArgs e)
 {
     //relaying OnDataError from datafetcher using this event
     base.OnErrorOccurred(e);
 }
Beispiel #14
0
 /// <summary>
 /// Method to be called when a tile error has occurred.
 /// </summary>
 /// <param name="e"><see cref="T:Mapbox.Map.TileErrorEventArgs"/> instance/</param>
 protected override void OnErrorOccurred(TileErrorEventArgs e)
 {
     base.OnErrorOccurred(e);
 }
Beispiel #15
0
 public override void DataErrorOccurred(UnityTile t, TileErrorEventArgs e)
 {
 }
Beispiel #16
0
 public virtual void DataErrorOccurred(UnityTile tile, TileErrorEventArgs e)
 {
 }
Beispiel #17
0
        protected virtual void OnErrorOccurred(UnityTile tile, TileErrorEventArgs e)
        {
            var handler = OnTileError;

            handler?.Invoke(this, e);
        }
Beispiel #18
0
 public override void DataErrorOccurred(UnityTile t, TileErrorEventArgs e)
 {
     ResetToFlatMesh(t);
 }
Beispiel #19
0
        private void Factory_OnTileError(object sender, TileErrorEventArgs e)
        {
            var handler = OnTileError;

            handler?.Invoke(this, e);
        }