Hello,
I have to display 3 OracleFeatureLayer at 3 differents scale :
private void InitializeAdminLayer()
{
string connectString = "User ID=xxxxx;Password=xxxxx;Data Source=xxxxx;";
OracleFeatureLayer oracleLayer1 = new OracleFeatureLayer(connectString, "ADMIN_UNIT_1", "IDADMINUNIT1");
OracleFeatureLayer oracleLayer2 = new OracleFeatureLayer(connectString, "ADMIN_UNIT_2", "IDADMINUNIT2");
OracleFeatureLayer oracleLayer3 = new OracleFeatureLayer(connectString, "ADMIN_UNIT_3", "IDADMINUNIT3");
oracleLayer1.CommandTimeout = 60;
oracleLayer2.CommandTimeout = 60;
oracleLayer3.CommandTimeout = 60;
oracleLayer1.ZoomLevelSet.ZoomLevel06.DefaultAreaStyle = AreaStyles.Country1;
oracleLayer1.ZoomLevelSet.ZoomLevel06.DefaultLineStyle = LineStyles.Utility1;
oracleLayer1.ZoomLevelSet.ZoomLevel06.DefaultPointStyle = PointStyles.City1;
oracleLayer1.ZoomLevelSet.ZoomLevel06.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10;
oracleLayer2.ZoomLevelSet.ZoomLevel11.DefaultAreaStyle = AreaStyles.Country2;
oracleLayer2.ZoomLevelSet.ZoomLevel11.DefaultLineStyle = LineStyles.Utility2;
oracleLayer2.ZoomLevelSet.ZoomLevel11.DefaultPointStyle = PointStyles.City2;
oracleLayer2.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level15;
oracleLayer3.ZoomLevelSet.ZoomLevel10.DefaultAreaStyle = AreaStyles.County1;
oracleLayer3.ZoomLevelSet.ZoomLevel10.DefaultLineStyle = LineStyles.Utility3;
oracleLayer3.ZoomLevelSet.ZoomLevel10.DefaultPointStyle = PointStyles.City3;
oracleLayer3.ZoomLevelSet.ZoomLevel10.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Proj4Projection proj4Projection = new Proj4Projection();
proj4Projection.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4Projection.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();
oracleLayer1.FeatureSource.Projection = proj4Projection;
oracleLayer2.FeatureSource.Projection = proj4Projection;
oracleLayer3.FeatureSource.Projection = proj4Projection;
LayerOverlay oracleOverlay1 = new LayerOverlay("Oracle1");
LayerOverlay oracleOverlay2 = new LayerOverlay("Oracle2");
LayerOverlay oracleOverlay3 = new LayerOverlay("Oracle3");
oracleOverlay1.Layers.Add("Oracle1", oracleLayer1);
oracleOverlay2.Layers.Add("Oracle2", oracleLayer2);
oracleOverlay3.Layers.Add("Oracle3", oracleLayer3);
oracleOverlay1.ServerCache = new ServerCache(@"c:\Temp\Oracle1\");
oracleOverlay2.ServerCache = new ServerCache(@"c:\Temp\Oracle2\");
oracleOverlay3.ServerCache = new ServerCache(@"c:\Temp\Oracle3\");
oracleOverlay1.IsBaseOverlay = false;
oracleOverlay2.IsBaseOverlay = false;
oracleOverlay3.IsBaseOverlay = false;
oracleOverlay1.IsVisible = true;
oracleOverlay2.IsVisible = true;
oracleOverlay3.IsVisible = true;
if (!Map1.CustomOverlays.Contains("Oracle1"))
Map1.CustomOverlays.Add(oracleOverlay1);
if (!Map1.CustomOverlays.Contains("Oracle2"))
Map1.CustomOverlays.Add(oracleOverlay2);
if (!Map1.CustomOverlays.Contains("Oracle3"))
Map1.CustomOverlays.Add(oracleOverlay3);
}
But when I debug my application, I have a javascript error :
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12030
I have :
- 834 entries in my table ADMIN_UNIT_1
- 2194 entries in my table ADMIN_UNIT_2
- 1007 entries in my table ADMIN_UNIT_3
This is my tables :
desc ADMIN_UNIT_1;
Name Null Type
------------------------------ -------- --------------
IDADMINUNIT1 NOT NULL NUMBER(10)
IDCOUNTRY NOT NULL NUMBER(10)
NAME VARCHAR2(50)
GEOMETRY SDO_GEOMETRY()
desc ADMIN_UNIT_2;
Name Null Type
------------------------------ -------- ---------------
IDADMINUNIT2 NOT NULL NUMBER(10)
IDADMINUNIT1 NOT NULL NUMBER(10)
NAME VARCHAR2(50)
GEOMETRY SDO_GEOMETRY()
desc ADMIN_UNIT_3;
Name Null Type
------------------------------ -------- --------------
IDADMINUNIT3 NOT NULL NUMBER(10)
IDADMINUNIT2 NOT NULL NUMBER(10)
NAME VARCHAR2(50)
GEOMETRY SDO_GEOMETRY()
It is possible that there are values in double in the column NAME.
For one of the layer, I have the message : "An Item With The Same Key Has Already Been Added".
Sometimes, I have an other message is shown. It's an Oracle error, the ORA-04030 out of process memory.
I have an idea to resolve it but I do not know how to do.
Is it possible to obtain only the features which are in the bounding box and to display them in another layer?
Thanks in advance for your answer.
Pierre-Antoine.