...
Differences Between MobileMap 4.x and MobileMap 5.x for Download Parameters
Download parameters are can be set at any point in time in MobileMap 4.x and they will be applied on the next data download. In MobileMap 5.x, these parameters are must be set right before generating a geodatabase. In MobileMap 5.x, these parameters can only be set upon initial geodatabase generationgeodatabase generation and cannot be changed after this step. For the lifespan of a generated geodatabase, it will only be able to download features with the parameters that were set originally when the geodatabase was generated. If a change is needed to the download parameters, a new database must be generated. See section MobileMap 5.x for more details.
Overview
Download parameters are a useful way to limit the feature service data that are downloaded to MobileMap. This can be helpful on large projects where downloading all data (spatial and tabular features) in all layers may cause a performance problem, produce a cluttered map, or simply result in the download of unnecessary or irrelevant data downloads.
...
Use of download parameters can also be helpful when you want to restrict data download to only the data that is relevant to specific users. An example of this is when an auditor needs to download all the data that was collected by a particular cruiser, but does not want to download any data from other cruisers. Another example is where a team wants to download all of the data for a particular project (or client, region, cover type, etc.) rather than all of the data in the feature service.
MobileMap 4.x
(For MobileMap 5.x, scroll down or select this link: https://woodlandsg.atlassian.net/wiki/spaces/MD/pages/952598533/MobileMap+Download+Parameters#MobileMap-5.x)
Setting Download Parameters
...
Download parameters for MobileMap 5.x are defined when creating the offline geodatabase is created. These parameters cannot be changed after creating the geodatabase. Therefore, if you need to change your download parameters, you will need to generate a new geodatabase.
...
To specify download parameters, a Feature Service needs to be selected for downloading (Actions menu → Configure Offline Geodatabase). Once a Feature Service has been downloadedselected, select tap the download button and then you should see to display the “Configure Offline Geodatabase Parameters” screen. You This will see display a table with a row for each of the layers in the service. The checkbox indicates that data should be downloaded for that layer. If data should be filtered or limited when downloading, specify the ‘Where Clause’. The Where Clause is the logic that will be used by MobileMap when it requests data for download. It follows the syntax used by the ArcGIS REST API’s where clause (https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm#GUID-62EE7495-8688-4BD0-B433-89F7E4476673 ).
In the screenshot below, the user has decided to NOT download data for any of the generic feature layers because they do not wish to clutter their map with ad hoc data collected by other users. They have also decided on to ONLY download data within the ‘NW’ Region. This assumes that there is a field named ‘Region’ and that ‘NW’ is a valid value.
...
Computers have a hard time comparing two decimal numbers for equality due to the well known round-off error problem (https://en.wikipedia.org/wiki/Round-off_error ). For this reason, avoid where clauses for decimal fields that use the equals sign and a specified value. Instead, use > and < to find matches. Example: Acres > 39.99 AND Acres < 40.01 will find Stands that are 40 acres.
...
Where Clause | Description | Example |
---|---|---|
field_name='text_value' | Downloads data where the text value matches the value in single quotes within the specified field | Region='NW' |
field_name=numeric_value | Downloads data where the numeric value matches the specified value within the specified field | Site_Index=2 |
field_name='text_value' AND field_name=numeric_value | Combination of the two examples above using the ‘AND’ operator. This will only download data where both conditions are met for a single feature | Region='NW' AND Cruiser_ID='ABC' |
field_name='text_value' OR field_name=numeric_value | Similar to above but using ‘OR’. This will download any feature that meets either criteria | Cruiser_ID='ABC' OR Contractor_ID='XYZ' |
|
|
|
Completing the Process
To complete the process tap the ‘download’ button:
...
This will initiate the generation of the offline geodatabase. MobileMap will create a new offline geodatabase using the download parameters that have been set. When this process completes, a popup message will display the results.
If the download parameters need to be changed in the future, the user will have to repeat the full process (generate offline geodatabase) above by doing the following:
Sync data to make sure all necessary data have been saved to ArcGIS
Generate offline geodatabase
Select the feature service
Optionally apply download parameters
Generate offline geodatabase