I'm trying to set a definition expression according to a user-selected value from a drop down menu, but I can't get the map to update the feature layers according to the expression. The user is able to click the drop down and select the values, but nothing happens when they click one. Any help would be appreciated, thanks!
HTML:
Select Building Level 1 2 3JS:
//creates and adds feature layers to mapvar generalIssuePoints = new FeatureLayer(".../FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"]});var firePullPoints = new FeatureLayer(".../FeatureServer/1",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"]});map.addLayers([generalIssuePoints, firePullPoints]);//handles drop-down change eventon(dom.byId("level"), "change", function(e) { var level = e.target.value; var definitionExpression = "LEVEL_ = " + level; //sets definition expression generalIssuePoints.setDefinitionExpression(definitionExpression); firePullPoints.setDefinitionExpression(definitionExpression);});
أكثر...
HTML:
Select Building Level 1 2 3JS:
//creates and adds feature layers to mapvar generalIssuePoints = new FeatureLayer(".../FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"]});var firePullPoints = new FeatureLayer(".../FeatureServer/1",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"]});map.addLayers([generalIssuePoints, firePullPoints]);//handles drop-down change eventon(dom.byId("level"), "change", function(e) { var level = e.target.value; var definitionExpression = "LEVEL_ = " + level; //sets definition expression generalIssuePoints.setDefinitionExpression(definitionExpression); firePullPoints.setDefinitionExpression(definitionExpression);});
أكثر...