The Camera point allows you to select photos from your photo library or capture new photos to be stored in a session. When used in conjunction with a Sketch point , you can draw sketches to add even more information to your photos.
Modern smartphones can be configured to automatically geo-tag photos which captures the geographical location
of where a photo was taken. The camera point captures this information and stores it within the photo, allowing
you to view this information simply by downloading the photo and viewing the photo's details. On a computer
running a Windows operating system this can be done by downloading the photo from the portal, right clicking on
the photo and selecting properties. Select the details tab to view all of the metadata for the photo, including the
Latitude
,
Longitude
and
Altitude
.
In order for geo-tagging information to be captured, the device's camera application will need to be configured to enable geo-tagging and allow location services. When a photo is taken, the device will need to be in an environment where a GPS location can be captured, otherwise no geo-tag information will be stored. If a GPS location is required, it is recommended to add validation to ensure a location is captured, see adding validation to GPS coordinates .
To ensure GPS information is captured for a camera point, you can use
dynamic references
to output the captured GPS latitude and longitude to Edit points and add validation to ensure the Edit points
have a value. This can be done by following the steps below:
For this example, the project contains an existing Camera point with the ID Name of
CameraPoint
.
CameraPoint.lat
. In the Edit point's properties ensure the
Read only value
is enabled to prevent user's from manually entering coordinates.
CameraPoint.long
. In the Edit point's properties ensure the
Read only value
is enabled to prevent user's from manually entering coordinates.
MathLatLong
.
((CameraPoint.lat > 0 | CameraPoint.lat < 0) & (CameraPoint.long > 0 | CameraPoint.long < 0)) ? 1 : 0
This expression will check the latitude and longitude values to ensure there is a valid coordinate. If there is,
the Math point's value will be 1 otherwise it will be 0.
Only allow sessions to be sent when the following point has the specified value
.
MathLatLong
and set
Valid when value equals
to
1
.
This will ensure that a session cannot be completed until there are valid GPS Coordinates captured for the camera point. For a working example of this validation, download or import the sample project .
You can configure another point to obtain information from a camera point by setting the point's ID to a dynamic reference. These dynamic references can be useful for extracting information for reports or for validation.
For example, if a project has a Camera point with the ID set as
CameraPoint
you can extract the GPS Latitude by adding an Edit point with the ID set as
CameraPoint.lat
. See the table below for the full list of available options or
download the sample project
to see how these dynamic references can be used in a project.
Value | Point ID Reference |
---|---|
Latitude Decimal |
CameraPointID.lat
|
Longitude Decimal |
CameraPointID.long
|
File Name |
CameraPointID.filename
|
Image Metadata |
CameraPointID.metadata
|
The Camera point can be configured in the Mobile Data Anywhere Designer to customise the capture method and display options. Below is an example of the properties window for a Camera point, opened in the Mobile Data Anywhere Designer.
This setting controls what happens when the camera point is tapped for the first time. It can be configured with any of the following options:
This is the default option and will display all options to the user so that they can choose between using the camera, photo library or automatically pick the latest photo from their photo library.
The camera will be opened allowing the user to quickly take a new photo without having to select the camera option.
The photo library will be opened allowing the user to quickly select an existing photo from their photo library without having to select the photo library option.
The most recent photo will be automatically selected from the photo library.
This setting allows you to set the desired size of the image when saved to the session. 640x480 is the recommended size for best presentation on A4 size reports. Larger resolutions may be required for more detailed reports.
On the mobile device, a Camera point will display a thumbnail within the session which will provide instructions to Tap to take a photo . Once a photo has been taken or selected from the device's photo library, the photo will display within the thumbnail, in the session. The size of the thumbnail is determined using the point's properties that are configured in the Mobile Data Anywhere Designer.
The following sample project demonstrates how a Camera point can be added to your projects along with dynamic references to capture geo-tag and photo metadata.