tangram-es
tangram-es copied to clipboard
Android SDK - How select building on map by click?
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
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.
You'll also need to set the interactive parameter to true
for the features that you want to interact with.