Check out example codes for "unity get coordinate of tile on tilemap". It will help you in understanding the concepts better.

Code Example 1

public class TilemapController2 : MonoBehaviour {     
   public Tilemap Tilemap;      // Use this for initialization     
   void Start () {         
     Vector3 tilePosition;         
     Vector3Int coordinate = new Vector3Int(0, 0, 0);         
     for (int i = 0; i < Tilemap.size.x; i++) {             
       for (int j = 0; j < Tilemap.size.y; j++) {                 
         coordinate.x = i; coordinate.y = j;                 
         tilePosition = Tilemap.CellToWorld(coordinate);                 
         Debug.Log(string.Format("Position of tile [{0}, {1}] = ({2}, {3})", coordinate.x, coordinate.y, tilePosition.x, tilePosition.y));             
       }         
     }     
   } 
 }

Learn ReactJs, React Native from akashmittal.com