slaylines / harp.gl-react-example

Example of React app with harp.gl.
https://www.harp.gl
Apache License 2.0
11 stars 3 forks source link

webbox gl expression not evaluating #2

Closed engdevlab closed 4 years ago

engdevlab commented 4 years ago

This seems to be a react issue in evaluating mapbox expressions? For the following, the when expression evaluations since changing the greater limit modifies the style appropriately. But, the size expression with "get" never evaluates. But, if I put an integer in size it evaluates fine. Thoughts?

const styleSet = [
  {
    when: ["all", [">", ["get","busy_rank"], '70']],
    technique: 'circles',
    attr: {
      color: '#01a39c',
      size: ["get","busy_rank"],
      opacity: 0.5,
      renderOrder: 100,
    }
  }
];
mkalygin commented 4 years ago

Hi @engdevlab! I don't think it's related to React, because this styleSet is used with harp.gl methods, hence the expression you've mentioned is handled by harp.gl, not React.

ninok commented 4 years ago

@engdevlab What harp.gl version are you using? Can you try if this works with the latest harp (i.e. 0.13.1)?

mkalygin commented 4 years ago

@engdevlab @ninok I updated this example to use harp.gl v0.16.0. I hope it is solved now. If it isn't fixed, please let me know.