Hi,
Is it possible to assign a javascript object to a Feature's Attributes? How do I define the field in the layer schema in reference to this attribute?
My javascript object looks something like this:
myObject = {
areaColor: "a8cfe1"
areaId: "a152D000000RDV5QAO"
areaName: "Territory 1"
calcAttData: []
config: {
center: {
type: "geographic",
attribute: "",
coordinates:[0.0, -60.0, 10.0],
fixed: false
}
}
}
I would like to declare the feature attribute like so:
{
assignment: myObject
}
and I think the field definition should look like this:
{
name: 'assignment',
type: 'blob'
}
Any help/guidance is greatly appreciated
Cheers!
Solved! Go to Solution.
I don't think I've used this, but your field definition is correct.
I was able to use it in this sample. I don't think it would work with the FeatureTable though, but should work in other places.
I don't think I've used this, but your field definition is correct.
I was able to use it in this sample. I don't think it would work with the FeatureTable though, but should work in other places.