CommTrack makes location data available through a fixture. For more details on how to work with fixtures, see: https://help.commcarehq.org/display/commcarepublic/Creating+and+Updating+Fixtures
Configuring Locations: In CommTrack, there is no need to create a fixture for locations. This is done automatically once the user has configured products through Setup -> Manage Locations.
Accessing Locations: When building a mobile application, fixture data can be accessed through the auto-created location fixture on the phone.
Example Location Fixture
The following location fixture is an example for a simple hierarchy containing a state, district, block and outlet.
<?xml version="1.0" encoding="UTF-8"?> <fixture id="commtrack:locations" user_id="217ce8d8e4cb726ca11c418dd00280d2"> <states> <state id="217ce8d8e4cb726ca11c418dd06071ca"> <name>Mass</name> <site_code /> <external_id /> <latitude /> <longitude /> <location_type>state</location_type> <districts> <district id="217ce8d8e4cb726ca11c418dd0606c8e"> <name>Suffolk</name> <site_code /> <external_id /> <latitude /> <longitude /> <location_type>district</location_type> <blocks> <block id="217ce8d8e4cb726ca11c418dd0606643"> <name>Boston</name> <site_code /> <external_id /> <latitude /> <longitude /> <location_type>block</location_type> <outlets> <outlet id="3b7bc6e458c49c6382c9220d7432a1ae"> <name>Boston medical</name> <site_code>bmc</site_code> <external_id /> <latitude /> <longitude /> <location_type>outlet</location_type> </outlet> </outlets> </block> </blocks> </district> </districts> </state> </states> </fixture>