Attribute form in both Mobile MapWorks Essentials and Advantage apps support blob attribute values. By blob attribute value we understand any binary data, currently: photo, video, signature and attachment.
In MMW Essentials read only blob attributes are available.
In MMW Advantage read and write blob attributes are available.
MMW retrieves blob related data from two sources:
Read blob
App communicates with WFS/DB to get a blob metadata. Using the metadata it retrieves blob via a blob service.
Create blob
Application creates blob and corresponding blob metadata. Blob metadata is saved via WFS/DB. Blob binary data is saved via a blob service.
Update blob
App communicates with WFS/DB to get a blob metadata and with a blob service to get a blob. Blob and its metadata are updated. Updated blob metadata is saved via WFS/DB. Updated blob binary data is saved via a blob service.
In order to make the system work three steps must be accomplished:
How to setup blob service?
How to setup WFS Feature class?
Blob metadata is a text, that's why WFS/DB sources that will store blob metadata must contain a feature class with an attribute of type text.
How to create MMW configuration?
Assuming you already have a wfs or db feature source description configured (wfsFeatureType or dbFeatureType ) and the feature source configuration has at least one text attribute defined. In order to add blob attribute you must create a new feature source description with "blob" type. The blob feature source description must point to your existing feature source description. Description of blob attributes are in "attributesMetadata" property. Blob attributes name must match the corresponding WFS attribute names. The dataset definition which pointed the wfs feature source description must point the blob feature source description.
Note:
Example below presents how to create blob feature source description that points to wfsFeatureType feature source description with photo and signature attributes.
"featureSourceDescriptions":[ { "id":"hydrantWfsBlobFsdId", "name":"blob", "type":"blob", "source":"hydrantWfsFsdId", "featureTypeMetadata":{ "crudPermissions":{ "isCreatePermitted":true, "isUpdatePermitted":true, "isDeletePermitted":true }, "attributesMetadata":{ "photo":{ "title":"Photo", "type":"photo", "contentType":"image/jpeg", "serviceUrl":"http://111.111.111.111/BlobService", "isReadOnly":false }, "video":{ "title":"Video", "type":"video", "contentType":"video/mp4", "service":"http://111.111.111.111/BlobService", "isReadOnly":false }, "signature":{ "title":"Signature", "type":"signature", "contentType":"image/svg+xml", "serviceUrl":"http://111.111.111.111/BlobService", "isReadOnly":false }, "attachment":{ "title":"Attachment", "type":"attachment", "contentType":"application/pdf", "serviceUrl":"http://111.111.111.111/BlobService", "isReadOnly":false } } } }, { "id":"hydrantWfsFsdId", "type":"wfsFeatureType", "typeName":{ "localName":"TempHydrant", "namespace":"http://www.intergraph.com/geomedia/gml" }, "primaryKeyFieldName":"FH_ID", "featurePrefix":"gmgml", "service":"hcwaWfsServiceId", "geometryFieldName":"Geometry", "geometryType":"Point", "featureTypeMetadata":{ "crudPermissions":{ "isCreatePermitted":true, "isUpdatePermitted":true, "isDeletePermitted":true }, "attributesMetadata":{ "id":{ "title":"Id", "type":"number", "isReadOnly":true }, "photo":{ "title":"Photo", "type":"text", "isReadOnly":false }, "video":{ "title":"Video", "type":"text", "isReadOnly":false }, "signature":{ "title":"Signature", "type":"text", "isReadOnly":false }, "attachment":{ "title":"Attachment", "type":"text", "isReadOnly":false } } } } ]
Full configuration sample