aeson-tiled icon indicating copy to clipboard operation
aeson-tiled copied to clipboard

`Array (Int, Int) a` and not `Vector a` for 2d data

Open ffaf1 opened this issue 3 years ago • 1 comments

As now objects and data in Layer have this signatures:

layerData :: Maybe (Vector GlobalId)	
layerObjects :: Maybe (Vector Object)	

But this is frankly not handy. Would it would be way better if it were Array (Int, Int) GlobalID or Map (Int, Int) a GlobalID? (Int, Int) being the coordinates, of course.

Is there something not allowing this automatic conversion?

ffaf1 avatar Nov 23 '21 18:11 ffaf1

I will add that after a thinking about it a bit, Array is more efficient but with Map you can call union to “merge” data layers, which is extremely handy.

ffaf1 avatar Nov 23 '21 20:11 ffaf1