Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Update Select Feature Example to Use Expressions #854

@riastrad

Description

@riastrad

The iOS feature selection example relies on expressions, but currently the Android equivalent does not leverage this.

I think this might be a good opportunity to refactor the SelectBuildingActivity to show off the Power of Expressions™.

My current thinking is that this change would be as simple as updating the onMapClick function to do this:

fillLayer.setProperties(
     opacity(
         match("<feature-name>",
             "<selected-feature-name>", 1,
             0
         );
     )
 );

(Instead of generating and re-drawing a new polygon on every map tap.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions