[solved] How to get tile dimension of a tile source?

Hello,

I’d like to get the width & height of a tile used in the tile source of the tilemap.

For the tilemap dimensions itself, i can use tilemap.get_bounds("#mytilemap") but it returns only origin of the tilemap, and its own dimensions.

I’ve tried different things, and the best i could do was (shamelessly stolen from the doc):
self.tilesource=go.get("#mytilemap","tile_source")

So self.tilesource contains a hash to the instancied tilesource, but what can i do with that ?

go.property("my_tile_source", resource.tile_source(self.tilesource))
And self.my_tile_source is nil after the above call.

What can i do , please ?

Ok found , after a bit of reading.
Here is the answer if someone is interested:

  -- get path tilesource ( hash:[/data/gfx/monalisa.t.texturesetc] )
  self.tilesource=go.get("#monalisa.tilemap","tile_source")
  -- tilessource is an atlas, get it
  local atlas = resource.get_atlas(self.tilesource)
  -- and here are width & height of first tile (they have all the same size)
  print(atlas.geometries[1].width,atlas.geometries[1].height)