Java Code Examples for com.nextgis.maplib.datasource.Feature#addAttachments()

The following examples show how to use com.nextgis.maplib.datasource.Feature#addAttachments() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VectorLayer.java    From android_maplib with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Feature cursorToFeature(Cursor cursor)
{
    Feature out = new Feature((long) Constants.NOT_FOUND, getFields());
    out.fromCursor(cursor);
    //add extensions to feature
    out.addAttachments(getAttachMap("" + out.getId()));
    return out;
}
 
Example 2
Source File: VectorLayer.java    From android_maplib with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Feature getFeatureWithAttaches(long featureId)
{
    Feature feature = getFeature(featureId);

    if (null != feature) {
        feature.addAttachments(getAttachMap("" + feature.getId()));
    }

    return feature;
}