Skip to content

Adds text under location icon - #401

Closed
cammace wants to merge 2 commits into
masterfrom
cam-59
Closed

cammace wants to merge 2 commits into
masterfrom
cam-59

Conversation

@cammace

@cammace cammace commented Apr 2, 2018

Copy link
Copy Markdown

This allows you to place a string text under the location icon. Right now I have the demo querying the map and filtering layer features to only those with names, thus ideally, this will show you the current POI you are at. Still, need to implement navigation version of this that shows current street.

Users can use the setPlaceText API to set the string which is displayed.

@cammace cammace self-assigned this Apr 2, 2018
@cammace
cammace requested review from danesfeder and tobrun April 2, 2018 19:30
List<Feature> features = mapboxMap.queryRenderedFeatures(rectF, has("name"));
if (!features.isEmpty()) {
locationLayerPlugin.setPlaceText(features.get(0).getStringProperty("name"));
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I like the idea shown above, I wonder if we need it as default behaviour?

updateMapWithOptions(options);
}

public void setPlaceText(String placeText) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing javadoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants