AnsweredAssumed Answered

FeatureLayer doesn't draw all features

Question asked by chiphankley on May 7, 2014
Latest reply on May 8, 2014 by chiphankley
ArcGIS Server 10.2.2, Windows Server 2012
Javascript API 3.9

I have a FeatureLayer that is not returning all of the records (features) that I expect it to.

The FeatureLayer is based on

  • an Oracle Spatial View

  • is NOT SDE (i.e. uses native spatial type)

The feature class has a fair number of features in it, but I'm setting a definition query that will only return 120 records at a time.  If I grab the definition query and test it in ArcMap, it returns the records I expect, but the same definition query through JS only returns about 20 records (for the FeatureLayer).  The same definition query works as expected against a DynamicMapServiceLayer.

The following is a simple page that displays the problem.  I'm rendering the DynamicMapServiceLayer at a lower opacity so that you can see all the features, with the FeatureLayer on top demonstrating that only a portion of the features are rendered.

Note that I have tried both SNAPSHOT and ONDEMAND modes... the behavior is the same for each.


Chip Hankley
Traveler Information Systems Developer
Traffic Operations and Safety (TOPS) Laboratory
Department of Civil and Environmental Engineering
University of Wisconsin-Madison

<!DOCTYPE html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples 
      on iOS devices-->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>FeatureLayer On Demand</title> 

    <link rel="stylesheet" href=""> 
    <link rel="stylesheet" href="">
      html, body, #mapDiv {
    <script src=""></script> 
      var map;
        "esri/map", "esri/InfoTemplate", "esri/layers/FeatureLayer",
        "dojo/parser", "dojo/domReady!"
      ], function(
        Map, InfoTemplate, FeatureLayer, 
      ) {
        map = new Map("mapDiv", { 
          basemap: "gray",
          center: [-89.6, 44.5],
          zoom: 6
        map.on("load", initOperationalLayer);

        function initOperationalLayer() {
          var defQuery = "POST like '%%' AND CONDITION like '%%' AND (UPDATED_ON_UNX < 1399457032226 AND MODIFIED_ON_UNX >= 1399457032226) OR (UPDATED_ON_UNX < 1399457032226 AND MODIFIED_ON_UNX IS NULL)";
          var URL = "";
          var infoTemplate = new InfoTemplate("<b>${HWYLIST}</b> between <br/><b>${START_CITY}</b> and <b>${END_CITY}</b>");
          var featureLayer = new FeatureLayer(URL + "0",{
            mode: FeatureLayer.MODE_SNAPSHOT,
            outFields: ["*"],
            infoTemplate: infoTemplate
          //Dynamic Map Service Layer
          var DMSLayer = new esri.layers.ArcGISDynamicMapServiceLayer(URL, {"opacity":0.30});
  <body class="claro"> 
    <div id="mapDiv">