|
POST
|
I have a map where when it is initialized, I want to highlight two different kinds of features -- each with a different color -- in my FeatureLayer. I'm creating two different Query objects, setting the FeatureLayer.selectionColor, and calling FeatureLayer.selectFeatures(). The effect is that it's highlighting features from both queries but it's setting the color for all to the last color I used for FeatureLayer.selectionColor. I realized that this was because when creating a new FeatureLayer and setting it equal to the layer that I'm querying against, it's using a reference for the new layer, not a value/copy. I attempted to clone the FeatureLayer using the code in this post (excellent code btw) which does create a true clone of the FeatureLayer (and not a reference) but the FeatureLayer.url property is not being copied (among other properties I think) so the selectFeatures() method fails. Am I going about this the wrong way? Is there a way to easily set the selectionColor to different colors on a layer? I like the highlighting of the selectedFeatures and would prefer to use it if at all possible. But if I have have to use a GraphicsLayer to different effect then I will. My code:
if (requestSites && requestSites != "")
{
queryExpr = "PK IN (" + requestSites + ")";
highlightSitesOnMap(queryExpr, queryUrl, 0xFFFF00);
}
. . .
if (manualSites && manualSites != "")
{
queryExpr = "PK IN (" + manualSites + ")";
highlightSitesOnMap(queryExpr, queryUrl, 0x0000FF);
}
. . .
private function highlightSitesOnMap(queryExpr:String, queryUrl:String, highlightColor:uint):void
{
facsQuery.where = queryExpr;
facsQuery.outSpatialReference = map.spatialReference;
facsQuery.returnGeometry = true;
var fLayer:FeatureLayer = new FeatureLayer();
for each (var lyr:Layer in map.layers)
{
if (lyr is FeatureLayer)
{
//fLayer = FeatureLayer(lyr); -- original attempt, makes a reference, not a copy
fLayer = WindsorUtils.deepClone(lyr) as FeatureLayer;
//fLayer.url = lyr.url; -- causes exception 'Access of possibly undefined property url through a reference with a static type com.esri.ags.layers:Layer'
if ((fLayer != null) && (fLayer.url == queryUrl))
break;
}
}
var selectionMethod:String = FeatureLayer.SELECTION_ADD;
fLayer.selectionColor = highlightColor;
fLayer.selectFeatures(facsQuery, selectionMethod, new AsyncResponder(onSelectResult, onSelectFault, fLayer));
this.map.addLayer(fLayer);
}
... View more
10-13-2011
07:51 AM
|
0
|
0
|
435
|
|
POST
|
I have a map where when it is initialized, I want to highlight two different kinds of features -- each with a different color -- in my FeatureLayer. I'm creating two different Query objects, setting the FeatureLayer.selectionColor, and calling FeatureLayer.selectFeatures(). The effect is that it's highlighting features from both queries but it's setting the color for all to the last color I used for FeatureLayer.selectionColor. I realized that this was because when creating a new FeatureLayer and setting it equal to the layer that I'm querying against, it's using a reference for the new layer, not a value/copy. I attempted to clone the FeatureLayer using the code in this post (excellent code btw) which does create a true clone of the FeatureLayer (and not a reference) but the FeatureLayer.url property is not being copied (among other properties I think) so the selectFeatures() method fails. Am I going about this the wrong way? Is there a way to easily set the selectionColor to different colors on a layer? I like the highlighting of the selectedFeatures and would prefer to use it if at all possible. But if I have have to use a GraphicsLayer to different effect then I will. My code:
if (requestSites && requestSites != "")
{
queryExpr = "PK IN (" + requestSites + ")";
highlightSitesOnMap(queryExpr, queryUrl, 0xFFFF00);
}
. . .
if (manualSites && manualSites != "")
{
queryExpr = "PK IN (" + manualSites + ")";
highlightSitesOnMap(queryExpr, queryUrl, 0x0000FF);
}
. . .
private function highlightSitesOnMap(queryExpr:String, queryUrl:String, highlightColor:uint):void
{
facsQuery.where = queryExpr;
facsQuery.outSpatialReference = map.spatialReference;
facsQuery.returnGeometry = true;
var fLayer:FeatureLayer = new FeatureLayer();
for each (var lyr:Layer in map.layers)
{
if (lyr is FeatureLayer)
{
//fLayer = FeatureLayer(lyr); -- original attempt, makes a reference, not a copy
fLayer = WindsorUtils.deepClone(lyr) as FeatureLayer;
//fLayer.url = lyr.url; -- causes exception 'Access of possibly undefined property url through a reference with a static type com.esri.ags.layers:Layer'
if ((fLayer != null) && (fLayer.url == queryUrl))
break;
}
}
var selectionMethod:String = FeatureLayer.SELECTION_ADD;
fLayer.selectionColor = highlightColor;
fLayer.selectFeatures(facsQuery, selectionMethod, new AsyncResponder(onSelectResult, onSelectFault, fLayer));
this.map.addLayer(fLayer);
}
... View more
10-12-2011
10:08 PM
|
0
|
0
|
492
|
|
POST
|
Cheers Vince. Got it -- will use inline view most likely. Also best practices are duly noted. Didn't realize that 'sdetable -o create_view' on ST_GEOMETRY tables is not a best practice. Thanks again for your help.
... View more
10-11-2011
12:01 PM
|
0
|
0
|
1625
|
|
POST
|
I'm using Oracle v10.2.0.4, and I have spatial view that works fine as long as I don't define 'select distinct' in the view sql. My view was created first by creating a simple view with a subset of columns from just my spatial layer: sdetable -o create_view -T VW_ERA_POINTS -t GIS_FP_POINTS
-c "OBJECTID,PK,NAME,TYPECODE,LAT,LON,SHAPE" I then modified the view SQL as follows: CREATE OR REPLACE FORCE VIEW "SDE"."VW_ERA_POINTS" ("OBJECTID", "PK", "NAME", "APP_USER_SEQ", "TYPECODE", "LAT", "LON", "SHAPE")
AS
SELECT
"GFP"."OBJECTID",
"GFP"."PK",
"GFP"."NAME",
"EAU"."USER_SEQ" as "APP_USER_SEQ",
"GFP"."TYPECODE",
"GFP"."LAT",
"GFP"."LON",
"GFP"."SHAPE"
FROM
SDE.APP_USER_ERA_ENV_INT_GROUP EAU,
SDE.GIS_FP_POINTS GFP,
SDE.ENV_INT FEI,
SDE.ENV_INT_TYPE EIT,
SDE.ENV_INT_GROUP EIG
WHERE
EAU.ERA_ENV_INT_GROUP_SEQ = EIG.ERA_ENV_INT_GROUP_SEQ
AND EIG.ERA_ENV_INT_GROUP_SEQ = EIT.ERA_ENV_INT_GROUP_SEQ
AND EIT.ENV_INT_TYPE_SEQ = FEI.ENV_INT_TYPE_SEQ
AND GFP.PK = FEI.FACILITY_SEQ
AND GFP.ISFAC = 'Y'; This works fine and I can view the view in ArcMap, etc. but returns duplicate rows because of the table relationships. If I change 'SELECT ...' to 'SELECT DISTINCT...', it reports the following error: ORA-22901: cannot compare nested table or VARRAY or LOB attributes of an object type
22901. 00000 - "cannot compare nested table or VARRAY or LOB attributes of an object type"
*Cause: Comparison of nested table or VARRAY or LOB attributes of an
object type was attempted in the absence of a MAP or ORDER
method.
*Action: define a MAP or ORDER method for the object type. And in fact it does the same when I run the SELECT outside of the view, i.e w/o the 'CREATE OR REPLACE FORCE VIEW...'. From what I've read on this KB article, it looks like it may be having a problem with the SHAPE column, but if I change '"GFP"."SHAPE" to 'TO_CHAR("GFP"."SHAPE")' per that article, then it throws a different error: ORA-00932: inconsistent datatypes: expected NUMBER got SDE.ST_GEOMETRY
00932. 00000 - "inconsistent datatypes: expected %s got %s"
*Cause:
*Action: My table describes, etc. are as follows (can't do 'describe long' since it exceeds 10,000 char limit of post): >sdetable -o describe -t GIS_FP_POINTS -- my spatial layer w/ SHAPE
ArcSDE 10.0 for Oracle10g Build 1343 Thu Feb 17 11:45:42 2011
Attribute Administration Utility
-----------------------------------------------------
Table GIS_FP_POINTS:
Column name Attribute type Null? Length,DPs RowID Column?
-------------------------------------------------------------------------------
OBJECTID SE_INT32 NOT NULL 10 SDE Set
PK SE_NSTRING NOT NULL 254
NAME SE_NSTRING NULL 254
PRGM SE_NSTRING NULL 254
PGRMPK SE_NSTRING NULL 254
LAT SE_FLOAT64 NULL 38,8
LON SE_FLOAT64 NULL 38,8
COL SE_NSTRING NULL 254
TYPECODE SE_NSTRING NULL 254
ISFAC SE_NSTRING NULL 254
COORD_ID SE_NSTRING NULL 254
SHAPE SE_SHAPE NULL 0
>sdetable -o describe -t APP_USER_ERA_ENV_INT_GROUP
ArcSDE 10.0 for Oracle10g Build 1343 Thu Feb 17 11:45:42 2011
Attribute Administration Utility
-----------------------------------------------------
Table APP_USER_ERA_ENV_INT_GROUP:
Column name Attribute type Null? Length,DPs RowID Column?
-------------------------------------------------------------------------------
APP_USER_ENV_INT_GROUP_SEQ SE_INT32 NOT NULL 10
USER_SEQ SE_INT32 NOT NULL 10
ERA_ENV_INT_GROUP_SEQ SE_INT32 NOT NULL 10
OBJECTID SE_INT32 NOT NULL 10 SDE Set
>sdetable -o describe -t ENV_INT
ArcSDE 10.0 for Oracle10g Build 1343 Thu Feb 17 11:45:42 2011
Attribute Administration Utility
-----------------------------------------------------
Table ENV_INT:
Column name Attribute type Null? Length,DPs RowID Column?
-------------------------------------------------------------------------------
ENV_INT_SEQ SE_INT32 NOT NULL 10
FACILITY_SEQ SE_INT32 NOT NULL 10
ENV_INT_TYPE_SEQ SE_INT32 NOT NULL 10
ENV_INT_FACILITY_PK_ID SE_STRING NOT NULL 21
ENV_INT_START_DATE SE_DATE NULL 0
ENV_INT_END_DATE SE_DATE NULL 0
ENV_INT_NOTES SE_STRING NULL 2000
ENV_INT_LAST_INSPEC_DATE SE_DATE NULL 0
LAST_MERGED_DATE SE_DATE NULL 0
OBJECTID SE_INT32 NOT NULL 10 SDE Set
>sdetable -o describe -t ENV_INT_TYPE
ArcSDE 10.0 for Oracle10g Build 1343 Thu Feb 17 11:45:42 2011
Attribute Administration Utility
-----------------------------------------------------
Table ENV_INT_TYPE:
Column name Attribute type Null? Length,DPs RowID Column?
-------------------------------------------------------------------------------
ENV_INT_TYPE_SEQ SE_INT32 NOT NULL 10
ENV_INT_TYPE_CODE SE_STRING NOT NULL 10
ENV_INT_TYPE_DESC SE_STRING NULL 100
ENV_INT_TYPE_DESC_LONG SE_STRING NULL 2500
DIVISION_SEQ SE_INT32 NULL 10
START_DATE_DESC SE_STRING NULL 50
END_DATE_DESC SE_STRING NULL 50
START_DATE_DESC_LONG SE_STRING NULL 1000
END_DATE_DESC_LONG SE_STRING NULL 1000
PRIMARY_APP_USER_SEQ SE_INT32 NULL 10
ORIGINATING_SYSTEM_SEQ SE_INT32 NULL 10
ENV_INT_START_PAGE_URL SE_STRING NULL 200
ENV_INT_FACILITY_PAGE_URL SE_STRING NULL 1000
ALWAYS_AUTO_DELETE SE_INT16 NULL 1
EPA_EI_TYPE_DESC SE_STRING NULL 100
IS_EXTERNAL_DATA SE_STRING NULL 1
HIDE_GEOCODES SE_STRING NULL 1
HIDE_LEGAL_COORDS SE_STRING NULL 1
ERA_ENV_INT_GROUP_SEQ SE_INT32 NULL 10
OBJECTID SE_INT32 NOT NULL 10 SDE Set
>sdetable -o describe -t ERA_ENV_INT_GROUP
ArcSDE 10.0 for Oracle10g Build 1343 Thu Feb 17 11:45:42 2011
Attribute Administration Utility
-----------------------------------------------------
Table ERA_ENV_INT_GROUP:
Column name Attribute type Null? Length,DPs RowID Column?
-------------------------------------------------------------------------------
ERA_ENV_INT_GROUP_SEQ SE_INT32 NOT NULL 10
ERA_ENV_INT_GROUP_CODE SE_STRING NOT NULL 10
ERA_ENV_INT_GROUP_DESC SE_STRING NOT NULL 100
ERA_ENV_INT_GROUP_LONG_DESC SE_STRING NOT NULL 2500
GROUP_WEB_URL SE_STRING NULL 200
OBJECTID SE_INT32 NOT NULL 10 SDE Set
Any help would be greatly appreciated.
... View more
10-10-2011
11:05 PM
|
0
|
4
|
5836
|
|
POST
|
Vince et al: Is it possible to register a view that is not a spatial view (i.e. no GEOMETRY column) in the same way one would register a table in SDE? I tried to do so in ArcCatalog and it returned the error: Failed to register with Geodatabase. Underlying DBMS error [ORA-00942: table or view does not exist] This is using ArcSDE for Oracle v10 SP2 against Oracle 10g (which according to Vince's note may be obsolete).
... View more
07-21-2011
08:57 AM
|
0
|
0
|
882
|
|
POST
|
@Chris Did they mention if the real bug might be the fact that the log did not actual reflect the design? ie If Arcmap joins are not supported then why does the log not say " Layer X contains unsupported joins" or something similar. No, ESRI Support did not mention that this is considered a bug in logging.
... View more
07-11-2011
06:27 PM
|
0
|
0
|
1641
|
|
POST
|
Followed up w/ ESRI Support. They consider this 'as designed'. BUG LOGGED AGAINST IT (rejected since 'as designed'): NIM062309: When a Feature Service's source map document contains a layer that participates in an ArcMap table join, that layer's attribute fields will not be listed when viewing that layer's properties in ArcGIS Services Directory. Status: Rejected This is actually by design - we don't support joins. A geodatabase relationship class where you query related records has been provided with feature services to support this case. You will need to make sure that the table and the feature class in the relationship are in the map when they publish. WORKAROUND: NIM069615: Request to allow the viewing and/or editing of attributes in a Feature Service that are from an ArcMap table join in the source map document.
... View more
06-22-2011
03:50 PM
|
0
|
0
|
2306
|
|
POST
|
An update to this, using AGS v10 SP2, SDE v10 SP2 for Oracle and Oracle 10g: I created a join in an ArcMap document to a local table, i.e. a table in ArcSDE (not registered) as opposed to a table in another schema. Again, in ArcMap I can view the attribute table fine and all columns are displayed. However when viewing the layer in the REST catalog, e.g. http://servername/ArcGIS/rest/services/servicename/MapServer/0 and .../FeatureServer/0, I see the following: * .../servicename/MapServer: Layer shows up under 'Layers' label and joined table shows up under 'Tables' label * .../servicename/MapServer/0: layer displays fine *and* all attributes -- including those from the joined table -- are shown in the Fields section * .../servicename/FeatureServer: Layer does *not* show up under 'Layers' label, but table shows up under 'Tables' label * .../servicename/FeatureServer/0 throws "An unexpected error occurred processing the request", as one would expect since it doesn't show up under Layers * .../servicename/FeatureServer/1: shows table details, including all Fields When restarting the AGS service, the following errors are reported (my map layer in ArcMap is called 'All Sites'): <Msg time='2011-06-22T10:37:14' type='INFO3' code='17002' target=servicename.MapServer' methodName='GraphicFeatureLayer.InitByLayer' machine='machinename' process='4444' thread='3088'>Error in generating Renderer Specific Information for All Sites.</Msg> <Msg time='2011-06-22T10:37:14' type='ERROR' code='17000' target='servicename.MapServer' methodName='GraphicFeatureServer.InitializeLayers' machine='machinename' process='4444' thread='3088'>Initialization of Layer: All Sites failed.</Msg> No errors are reported for servicename.FeatureServer. Logging is set to 'Verbose'. I get the exact same behavior in all respects if I register the table with the geodatabase.
... View more
06-22-2011
09:58 AM
|
0
|
0
|
2306
|
|
POST
|
Due to a bug in the REST API explained in this post, I'm looking for alternatives to a join in my MXD file that will enable me to: - append columns in an Oracle table/view as attributes to my feature classes - edit the feature classes using a w/ a Web editing client (a client-side FeatureLayer and a server-side FeatureServer) using a v10 REST API (Flex), i.e. cannot use spatial views I'm using AGS v10 SP2 and SDE v10 SP2 for Oracle and Oracle 10g on a server that's remote from AGS. At first I created a synonym to a table in another schema in the same Oracle instance, added the synonym to my ArcMap document, and created a join in my ArcMap document to the synonym. When I did so, if I browsed to the FeatureServer in the REST catalog then I got a 'server 500' error (per this thread). While the FeatureServer threw a 500, the MapServer didn't throw an error but the attributes from the joined synonym didn't show up either. Admittedly I did this in v10 SP1 and haven't re-checked this configuration using v10 SP2. Then after upgrading to v10 SP2: - created synonyms in my SDE instance to the tables that I wanted to get attribute info from in the other schema (same Oracle instance) - created a view (Oracle view, not a spatial view) to the synonym tables in the SDE schema - added the view to my ArcMap document - created a join in ArcMap to the view In ArcMap I can see all columns from the joined view just fine when viewing the attribute table. My REST service no longer throws a server 500 error for the FeatureServer, but neither do I see the columns from my view in either the MapServer or the FeatureServer. If I'm not mistaken, I can't use spatial views in lieu of my feature classes since you can't edit views. Nor can I use relationship classes as long as the tables I'm joining to are in another schema (since the tables at both ends of the relationship class must be registered in the geodb). Nor can I use on-the-fly relates in ArcMap since the related attributes aren't actually appended to the feature class attribute table (and from reading the rest of the other thread it looks like relates are broken too when making the join). Any thoughts on how I can get attribute data from other tables into my feature classes while also being able to edit my feature classes using the v10 REST APIs??
... View more
06-22-2011
07:57 AM
|
0
|
0
|
938
|
|
POST
|
I'm having similar -- if not identical -- issues. My problem is complicated by the fact that I can't use spatial views since I need to edit features from a Flex Web client using a client-side FeatureLayer and a server-side FeatureServer. I'm using AGS v10 SP2 and SDE v10 SP2 for Oracle and Oracle 10g on server that's remote from AGS. At first I created a synonym to a table in another schema in the same Oracle instance, added the synonym to my ArcMap document, and created a join in my ArcMap document to the synonym. When I did so, if I browsed to the FeatureServer in the REST catalog then I got a 'server 500' error (per this thread). The MapServer didn't throw an error, but the attributes from the joined synonym didn't show up either. Admittedly I did this in v10 SP1 and haven't re-checked this configuration using v10 SP2. Then after upgrading to v10 SP2 I: - created synonyms in my SDE instance to the tables that I wanted to get attribute info from in the other schema (same Oracle instance) - created a view (Oracle view, not a spatial view) to the synonym tables - added the view to my ArcMap document - created a join in ArcMap to the view In ArcMap I can see all columns from the joined view just fine. My REST service no longer throws a server 500 error for the FeatureServer, but neither do I see the columns from my view in either the MapServer or the FeatureServer. If I'm not mistaken, I can't use spatial views in lieu of my feature classes since you can't edit views. Nor can I use relationship classes as long as the tables I'm joining to are in another schema (since the tables at both ends of the relationship class must be registered in the geodb). Nor can I use on-the-fly relates in ArcMap since the related attributes aren't actually appended to the feature class attribute table (and from reading the rest of this thread it looks like relates are broken too when making the join). Any thoughts on how I can get attribute data from other tables into my feature classes while also being able to edit my feature classes using the v10 REST APIs??
... View more
06-21-2011
05:04 PM
|
0
|
0
|
2306
|
|
POST
|
I verified that I have build 2475, even though this shouldn't affect ArcEditor users (the mobile toolboxes were not available to ArcView users before that build). So, still not sure why I don't have the Mobile toolbox. Thoughts? That was it -- had to look in ArcToolbox under ...\Mobile10.0. Thanks Denise.
... View more
05-26-2011
11:11 AM
|
1
|
0
|
1463
|
|
POST
|
I verified that I have build 2475, even though this shouldn't affect ArcEditor users (the mobile toolboxes were not available to ArcView users before that build). So, still not sure why I don't have the Mobile toolbox. Thoughts?
... View more
05-24-2011
08:18 AM
|
0
|
0
|
1463
|
|
POST
|
I'm running a v10 SP1 EDN-licensed version of ArcEditor, and according to the Mobile Toolbox Licensing page on the Desktop Help, I should have the Mobile toolbox tools, but I don't. The toolbox file is not in either of the expected installed locations (Desktop10.0\ArcToolBox\Toolboxes or Server10.0\ArcToolBox\Toolboxes). Any ideas why this might be so?
... View more
05-24-2011
07:36 AM
|
0
|
11
|
9721
|
|
POST
|
I'm setting up a v9.3.1 gp svc that creates a zip file (which contains a shapefile) that I'd like to publish as an ArcGIS Server gp service to be consumed by a SOAP client in a .NET Web app. The gp service references a toolbox w/ a v9.3.1 python script that creates the zip file. It currently creates a custom output directory that is not related to the scratchworkspace. I'm trying to figure out is how to make the zip file available from the gp service so that the SOAP client can check on the status and get the resulting zip file when the gp service is 'successful', e.g.
if (jobStat == esriJobStatus.esriJobSucceeded)
{
GPResult results = gpserver.GetJobResult(jobID, null, resultOptions);
GPDataFile zipfile = (GPDataFile)results.Values[0];
}
My python script currently has this:
gp.FeatureClassToFeatureClass_conversion(myLayer, outputDir, outputShapeName, queryExpr)
zipfolder.zipFolder(outputDir, outZipFile)
zipfolder.zipFolder is a customized module of the v9.3 zip python script, but it writes the zip file to a custom folder -- it doesn't create gp output. My gp tool has an output parameter of type 'file', but I'm not clear on how to implement it. Questions: 1. How do I mod the zip logic in the v9.3 zip python script to create a gp service output? 2. Do I have to output the file into the scratchworkspace to be able to consume it from a calling client app?
... View more
05-22-2011
12:32 PM
|
0
|
1
|
2537
|
|
POST
|
Finally tracked down a AGM 10 installation (from the Customer Care Portal) where I downloaded an ISO (ArcGIS_Mobile10_b2475_123336.iso) that when extracted, contained a folder named 'MobileWindowsApp'. But that folder has only setup.exe/msi files, which can't be run from the Juno, and the setup1.cab file in that same folder fails to install. ESRI said to 'connect the Juno via USB cable to the desktop/laptop machine for installation process to be performed', which I did, but it installs it on my desktop, not the mobile (at least I think so -- couldn't find any Windows Mobile app anywhere) and when starting AGM on the Juno it says that 'No projects were found on this device'. Can't find installation instructs anywhere. Has anyone successfully installed the v10 Windows Mobile App on a Trimble/mobile device? What am I missing??
... View more
05-19-2011
08:17 PM
|
0
|
0
|
427
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-28-2016 10:51 AM | |
| 1 | 07-20-2023 05:07 PM | |
| 1 | 07-05-2017 03:06 PM | |
| 1 | 07-05-2017 03:39 PM | |
| 7 | 12-09-2022 04:49 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-19-2025
08:18 AM
|