Thank you, I found that the function _load_tiled_tmx_map() needs a small hack to gather the property I needed (the idx of image),
this is your code in tiledmap.py from line 185
for ypos in xrange(0, layer.height):
for xpos in xrange(0, layer.width):
x = (xpos + layer.x) * layer.tilewidth
y = (ypos + layer.y) * layer.tileheight
img_idx = layer.content2D[xpos][ypos]
if img_idx == 0:
continue
try:
offx,offy,tile_img = resource.indexed_tiles[img_idx]
screen_img = tile_img
except KeyError:
print 'KeyError',img_idx,(xpos,ypos)
continue
sprite = Sprite()
sprite.image = screen_img
sprite.rect = screen_img.get_rect(topleft=(x + offx, y + offy))
sprite.name = xpos,ypos
#myhack to detect which is idx of image in the sprite
sprite.img_idx=img_idx
#end of hack
gummworld_layer.add(sprite)