How do I get the JSAPI to scale features to real world sizes for CSV layers?

551
3
02-20-2020 10:27 AM
MatthewBarr1
New Contributor

Not sure whether this is a bug or user error, but the JSAPI does not appear to support scaling visual variable sizes to real-world distance units.  Instead, it creates giant black squares.  See the codepen, taken from ESRI's csvLayer example, modified to use a size visual variable that should scale with horizontal error (miles)

https://codepen.io/robmattles/pen/zYGrmOb

0 Kudos
3 Replies
Noah-Sager
Esri Regular Contributor

Looks like you were 95% of the way there. Just a couple typos in the code. Note that the codepen doesn't play nicely with the hosted csv file, but if you host the app locally you will see the earthquakes.

https://codepen.io/noash/pen/GRJjwbx 

0 Kudos
KenBuja
MVP Esteemed Contributor

Is there a reason the symbols get cut off when you zoom in?

0 Kudos
Noah-Sager
Esri Regular Contributor

Yes, unfortunately. This is a known issue we are currently investigating.

0 Kudos