I have a data set in which not all tuples have info for all columns.
I want to show those columns in the infowindow, but if the data value is inconsequential (doesn't exist, is zero in a field where zero equates to doesn't exist), I don't want the title of the field shown - absence should be sufficient to show the user that the data isn't there.
How would I do that?
Answer
The easiest way is to use the mustache templates. In the custom HTML infowindow field (or hovers), you can put the following around text you want to conditionally appear:
{{#col_name}}
{{col_name}}
{{/col_name}}
{{^col_name}}
No information
{{/col_name}}
No comments:
Post a Comment