mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

add error callbacks to AbstractTileFactory//MapVisualizer

Open isiyu opened this issue 9 years ago • 3 comments

Add to AbstractTileFactory or MapVisualizer an OnError event that we could register to. This event would be fired whenever data retrieval or rendering has failed for any reason, and it could pass an error code.

isiyu avatar Oct 04 '17 18:10 isiyu

@brnkhy @BergWerkGIS @apavani Do you have any specific implementations for this in mind? How far up should these errors bubble up?

david-rhodes avatar Oct 20 '17 21:10 david-rhodes

One implementation that I could think of was to use a bubbling system from Tile to Factory to MapVisualizer to AbstractTileProvider. I need help understanding the flow of data and class hierarchy for that.

We can have a linked event model set up in each of the classes through a bubbling up system as follows:

public event EventHandler EventFired
{
    add { this.instance.EventFired += value; }
    remove { this.instance.EventFired -= value; }
}

apavani avatar Oct 21 '17 02:10 apavani

PR here -> https://github.com/mapbox/mapbox-unity-sdk/pull/317

isiyu avatar Oct 24 '17 16:10 isiyu