A method and a device for localization using grid-based localization of map constraints are described. In an example, an indoor space is divided into a grid of tessellated polygonal tiles in a hierarchical structure. The grid is correlated with physical entities in the indoor space by associating each physical entity with a polygonal tile. Further, an absolute probability value indicative of presence of a device therein is associated with each polygonal tile. As part of associating, the absolute probability value is allocated to each polygonal tile in each hierarchical level to create a probability map for the indoor space. The probability map is used to generate a grid map for the indoor space and the grid map is usable to determine location of the device in the indoor space.