Hello
I would like to use PostGIS extension, but dind't find documentation. How do I load layers of PostGIS?
Thanks.
Hello
I would like to use PostGIS extension, but dind't find documentation. How do I load layers of PostGIS?
Thanks.
Helio,
Thanks for your question!
We actually have a sample application that show this under the Data Providers Heading: LoadAPostgreSQLVectorLayer
Here is a sample of the code:
private void LoadPostgreVectorLayer()
{
string connectString = "Server=192.168.0.235;User Id=userId;Password=password;DataBase=postgis;";
PostgreSqlLayer postgreLayer = new PostgreSqlLayer(connectString, "new_states", "recid");
postgreLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
postgreLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticLayers.Add("PostgreLayer", postgreLayer);
}
ThinkGeo Support
Helio,
One other thing to consider when using PostGRE is that we have implemented it as a Spatial Extension. What this means is that if you want the code that was posted above to work correctly you will need to add a reference to the PostGRESpatialExtension.dll. This DLL can be found in the Developer Reference folder where you installed the product.
Let us know if you have any questions on the PostGRE functionality or ways to make it better! We are here to help.
Thanks!