Hi,
The constructor to class FeatureSourceColumn, used to define columns in dynamical feature sources, have a constructor enabling setting both a type of column and an accompanying length parameter. However, the are not explained in any way.
The question has been raised a couple of times here, but never answered with a comprehensive list of options, as far as I can find. The type names are given as a string, not an enumeration, so the question is relevant. The only examples I did find were using "string" for a varchar type, but e.g. nothing about its maximum length, if one such exist.
Neither the manual not the wiki seem to contains any such. So my question is, where can I find a comprehensive list of type names to be used with the FeatureSourceColumn constructor ?
Cheers.
FeatureSourceColumn type names et.al.?
Hi Lars,
In the constructor of FeatureSourceColumn(string columnName, string typeName, int maxLength),the typename is the same as the datatype provided in Database(Oracle or SQL Server), maxlength is the max length you want the column to have, for example:
FeatureSourceColumn newColumn = new FeatureSourceColumn("Population", "Number", 22);//oracle
FeatureSourceColumn newColumn = new FeatureSourceColumn("Population", "Int", 4);//sql server
Regards
Edgar
Hi Edgar,
Thanks, but again I'm still lacking a comprehensive overview.
You mention Oracle and Sql Server, but neither is used wrt. EditFeatureOverlay and InMemoryFeatureLayer, which is where I need it. Or do you mean to say, that you've implemented the type names to mimic all the variable type names from both PL-SQL and T-SQL ?
'cause I don't suppose that I can use any old variable type available in Sql Server, e.g. including "nvarchar", "ntext", and "image" ???
Ps! The reply editing on this website is suddenly defunctional when run in Firefox (v17.0). I never get the editing toolbar, hence the "ugly" appearence in the first post. Any thoughts as to why this happens ?
Hi Lars,
Thanks for reporting the text editor issue.
I will let Edgar address your FeatureSourceColumns question but the issue with the text editor is a issue obviously introduced with Firefox 17.0 that our web designer is looking into.
Well, let’s talk about it in another way: Do you mean that you want to use it in the InMemoryFeatureLayer and it doesn’t work? Could you please describe your scenario to us?
Thanks,
Edgar
Hi Edgar,
I'm currently working with custom styling as base64 encoded serialized style objects. This require much space.
But what are the limits of using type name "string" in Map Suite ? I don't know, and the info is nowhere to be found. So I'm left guessing, which doesn't suit me much.
I also need to attach numeric attributes to my features, but is that "int", "integer", "long", and how does the length parameter play into this ?
And if I wanted to use boolean values, would that be "boolean", "bit", "tinyint", or just "int", or something else entirely ?
It's a general question, for which there should be a general answer, one that ought to be documented somewhere.
The obvious improvement here would be to use enumerations instead, limiting the choice to a fixed known set of parameters. But until then, I'd like to know what I'm dealing with, instead of just using time consuming guesswork and trial/error.
Lars,
The reason we made it to string type is that the users might override the FeatureSource and FeatureSourceColumn,they have their own columns, which could be defined as any type, any name, so we cannot make the TypeName to Enum, in your scenario, you can override the FeatureSourceColumn and define your own type name.
Regards,
Edgar
Hi Lars,
Also the issue with the editing toolbar and Firefox 17 was resolved with Firefox 17.0.1.