Hello,
I am trying to add a layer from the URL "Layer: Arbolado de riesgo (ID: 0) " to my map as a FeatureLayer, but I am getting an "Invalid JSON" error when it loads.
It is supposed to be quite easy to load it, something like this:
FeatureLayer gdbFeatureServiceTable = new FeatureLayer(new Uri("[LayerURL]"));
_map.OperationalLayers.Add(gdbFeatureServiceTable);
What am I doing wrong?
Solved! Go to Solution.
Hi Alberto,
How was this service created? Is this from archived history table? The reason I ask is because it's using a reserved word as its field name 'gdb_archive_oid' so we're unable to create the table. If this field were renamed to something else, it should work.
I logged an issue on our end to check if there's something we can do about it. Any additional info you can share would help us track how we can prevent this.
Thank you.
Jennifer
Hi,
I can confirm that this wont work in Runtime for reason or another. I have passed figuring out why to my team member that hopefully have a bit more time.
You can try to set the renderer to a simple renderer and see if that makes any different.
Hello Antti,
I made a try setting a simple renderer, but no luck. Do you have another idea that may help?
Thanks for your help!
Hi Alberto,
How was this service created? Is this from archived history table? The reason I ask is because it's using a reserved word as its field name 'gdb_archive_oid' so we're unable to create the table. If this field were renamed to something else, it should work.
I logged an issue on our end to check if there's something we can do about it. Any additional info you can share would help us track how we can prevent this.
Thank you.
Jennifer
Hello Jennifer,
You where correct, it was the versioning. We made a copy of the feature class and it worked perfectly with the copy.
Thanks for your help!