- Jun 6, 2020
- 11,593
- 4,507
Hi
I have implemented a map with a sparse matrix of cells using label views; approx 1000 of them. I did it this way as the map is of arbitrary shaped vegetable gardens with different crops . Hence sparse rather than rectangular matrix. Each cell can represent an arbitrary area and they don't have to be square. This makes it very versatile for different types of crop arrangements, Although within any single map all cells must be there same dimensions. But you can have multiple maps.
It works very well and is quite fast. The attributes of each cell are recovered from a data base with and ID and the xy co'ords of the cells. Each cell has an attribute such as path, soil, compost bins etc and soil cells are set to cultivatable so that a crop ID can be assigned to the cell. To speed things up I store the attributes in a B4XMap. I store the ID of each cells label in its Tag as an integer. I use this to key into the database and B4XMaps.
All good. To change a cell click on it...
I have implemented a map with a sparse matrix of cells using label views; approx 1000 of them. I did it this way as the map is of arbitrary shaped vegetable gardens with different crops . Hence sparse rather than rectangular matrix. Each cell can represent an arbitrary area and they don't have to be square. This makes it very versatile for different types of crop arrangements, Although within any single map all cells must be there same dimensions. But you can have multiple maps.
It works very well and is quite fast. The attributes of each cell are recovered from a data base with and ID and the xy co'ords of the cells. Each cell has an attribute such as path, soil, compost bins etc and soil cells are set to cultivatable so that a crop ID can be assigned to the cell. To speed things up I store the attributes in a B4XMap. I store the ID of each cells label in its Tag as an integer. I use this to key into the database and B4XMaps.
All good. To change a cell click on it...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید