1

I have some levels with many features. Each feature has properties, e.g. Values (is an Array). But I can not access this property.

When I try to access the property like that

layer.getSource().getFeatures()[0].values

I get an undefined exception. I try to access it

layer.getSource().getFeatures().get('values')

Does this function not exist.

What must i do? How can i access my required values?

Andy C
  • 19
  • 1
  • 3

1 Answers1

3

You can use

layer.getSource().getFeatures()[0].getProperties().values

or

layer.getSource().getFeatures()[0].get('values')
Mike
  • 16,042
  • 2
  • 14
  • 30