ThinkGeo.com    |     Documentation    |     Premium Support

Load layer from SqlServer

Hi! Is there an example to load a layer from SqlServer?

Thank you

Regards
Abel

Hi Abel,

I think that’s very simple to load a layer via SqlServer, the sample code like this, which render the area shapes from SqlServer:

MsSql2008FeatureLayer sql2008Layer = new MsSql2008FeatureLayer(connectString, “States”, “recid”);
sql2008Layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
sql2008Layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

And you can just put the code in any of our sample here: https://github.com/ThinkGeo?utf8=✓&q=webapi&type=&language=

For example the HelloWorld,

Regards,

Ethan

Hi Ethan

It’s Work!

Thank you

Abel

Hi Abel,

I am glad to hear that works.

Regards,

Ethan