I'm a new user.load data error

Dec 26, 2012 at 11:54 AM

do: protected virtual void OnSridChanged(EventArgs eventArgs)
        {
            Factory = GeometryServiceProvider.Instance.CreateGeometryFactory(SRID);//error:Cannot use GeometryServiceProvider without an assigned IGeometryServices class
            
            if (SridChanged != null)
                SridChanged(this, eventArgs);
        }

 

this is my code

VectorLayer layadmin = new VectorLayer("OracleSample");
  layadmin.DataSource = new SharpMap.Data.Providers.Oracle("system", "sde", "127.0.0.1","ADMIN_REGION", "MDSYS.SDO_GEOMETRY", "ADAID");//this error

Coordinator
Dec 27, 2012 at 12:49 PM

What does the error say?

Coordinator
Dec 28, 2012 at 11:35 PM

Right at the startup of your code be sure to assign

GeoAPI.GeometryServiceProvider.Instance = new NetTopologySuite.NtsGeometryServiceProvider();

Hth FObermaier