Query Oracle table and map ArcGIS Javascript API

7362
15
12-05-2016 06:18 PM
AhmadSopian1
New Contributor

How to display layer the appropriate map query???

0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Emeritus

Ahmad,

   Are you wanting to query Oracle directly without using ArcGIS Server?

0 Kudos
AhmadSopian1
New Contributor

not, i'm using geodatabase n arcgis server Robert Scheitlin, GISP‌..

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ahmad,

   So do you have a map service published for this Oracle data then?

0 Kudos
AhmadSopian1
New Contributor

Yes, I've map services published arcgis server n geodatabase connected oracle, so I do not know if I have a query or define that layer?

So, rscheitlin‌ get you to give me a solution n example...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ahmad,


  Have you seen the Js API documentation? You need to add your layers using ArcGISDynamicMapServiceLayer or FeatureLayer. If you need limit the features for a layer than you can define a definition query in code. The API has many examples that you should begin looking at

0 Kudos
AhmadSopian1
New Contributor

Can I use relationalship query in ArcGIS server ?, and I implement it in ArcGIS javascript API?

 function initOperationalLayer() {
              var infoTemplate = new InfoTemplate("${BD_ID}", "Building Name:  ${BD_NAME}", "Building Name:  ${BD_NAME}");
              var bdID = "BD_ID='PND_A' OR BD_ID= 'PND_J'";  
              var featureLayer = new FeatureLayer("http://localhost/arcgis/rest/services/Demo/Demo/MapServer/0", {
                  mode: FeatureLayer.MODE_ONDEMAND,
                  outFields: ["*"],
                  infoTemplate: infoTemplate
              });

              featureLayer.setDefinitionExpression(bdID); 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ahmad,

   Again relationship queries are covered in the JS API documentation:

RelationshipQuery | API Reference | ArcGIS API for JavaScript 3.18 

0 Kudos
AhmadSopian1
New Contributor
Thanks Robert Scheitlin, GISP, i've tried using relationalquery, but it has not yet completed my problem. 
I want the layer to appear by year in the table, Can you refer to me..
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ahmad,

   Maybe sharing the code you have tried will help me understand what you are wanting to do.

0 Kudos