tangram-es icon indicating copy to clipboard operation
tangram-es copied to clipboard

Android SDK - How select building on map by click?

Open ivanking87 opened this issue 4 years ago • 2 comments

How can I make a map interactive? To click on the building of its boundaries can be highlighted? Tried using setLabelPickListener and setFeaturePickListener, but they return an empty result

ivanking87 avatar Sep 13 '19 08:09 ivanking87

You have to set a FeaturePickListener but then also call pickFeature to actually pick the feature. Highlighting the boundaries is not possible as far as I know because the Listener only gets the properties of the picked feature, not the geometry. If it would, you could add the highlighted building as a marker.

westnordost avatar Jan 18 '20 18:01 westnordost

You'll also need to set the interactive parameter to true for the features that you want to interact with.

matteblair avatar Jan 22 '20 05:01 matteblair