Grouped locations
So far we have seen how to use mtaa to access certain information at a particular location level, now let's see how we can use it to fetch grouped information such as all regions, districts, wards , districts and also fetching whole tree from a particular location level
Regions#
You can use your previous knowledge about mtaa to access all the regions from the top level mtaa.Tanzania objects or from mtaa.regions as shown below;
Districts#
To access all districts in tanzania, together with their post code, you just need to access districts attribute as shown below;
Wards#
You can also access all the wards in the country by accessing wards attribute as shown below;
Streets#
You can also access all streets in Tanzania in a similar fashion as shown below;
Fetching a Whole location tree#
You can also fetch the whole location tree at a particular location level, for instance if your on a districts level when you use tree(), it will fetch all lower level branches starting from all wards, streets and neighborhoods present in that district;
Well you're done with grouped locations