Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text-field properties #3072

Closed
anna-geo opened this issue Aug 26, 2016 · 4 comments
Closed

text-field properties #3072

anna-geo opened this issue Aug 26, 2016 · 4 comments

Comments

@anna-geo
Copy link

There are two questions:

  1. Is it possible to use two fields in "text-field" property? I tried like this but with no success:
    "text-field": "{name_main} {name_additional} "
  2. Does the text-field support any regular expressions? For example, if I want to replace some symbols in text strings (values of text-field) on my map.
@jfirebaugh
Copy link
Contributor

Hi @anna-geo, normally we reserve the issue tracker here for bug reports and feature requests. For support questions, please see https://www.mapbox.com/help/ or ask on Stack Overflow. But I'll answer these real quick:

  1. Yes, that should work. If you have a case where it isn't working please open an issue with a JSFiddle showing a minimal test case.
  2. Regular expression are not supported. See Allow use of find/replace regex to compute property values mapbox-gl-style-spec#321 for the issue requesting that.

@FergusDevelopmentLLC
Copy link

Could you post a working example of #1? The jsfiddle link no longer works.

@ryanhamley
Copy link
Contributor

@FergusDevelopmentLLC The token syntax referenced in this ticket ({}) is deprecated. We recommend using the expression syntax now. Here's an example.

@FergusDevelopmentLLC
Copy link

Thank you very much for the example. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants