I use MapWinGis and it is really very useful.I use PostgreSQL and i move my shape files to PostgreSql via PostGis 2.0 ShapeFile.Layers are shown very quickly with AddLayerFromDatabase method.BUt i have one question.I have created mw_styles table.I inserted layer, style name etc. data into it.How can i load style from PostgreSQL database? As far as i know LoadLayerOptions only work with a file.I tried LoadLayerOptions with a shape file it worked correctly.But i want to get styles from PostgreSQL database?How can i do?
I can’t give you a specific solution to your problem.
But I may be able to push you in the right direction.
When you add styles to a layer in QGIS and save it to PostgreSQL it automatically creates a table in the public schema called “layer_styles”.
It contains a reference to your table and the spatial data column and the style definition in xml format.
My guess is that you somehow can create this table yourself!?
Please let me know if you want an example.
And please let me know if you find a solution.
I will need to do something similar in the near future.
I checked OrgLayer Class SupportsStyles returns false.
My question is LoadLayerOptions method load styles from ShapeFile in my disk.I want to load styles from PostgreSql database.How can i do?I have all tables and spatial database