function showResults(featureSet) { // Clear prior graphics map.graphics.clear(); // Assign symbology to selected features var parcelSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([98, 194, 204]), 2), new dojo.Color([98, 194, 204, 0.5])); // Put result in array var resultFeatures = featureSet.features; if (resultFeatures.length > 0) { // Empty out array for new features features = []; // Loop through each feature (here it's limited to one feature) for (var i=0, il=resultFeatures.length; i<1; i++) { var feature = resultFeatures; feature.setSymbol(parcelSymbol); var geometry = feature.geometry; var parcelGraphic = new esri.Graphic(geometry); var attr = {}; parcelGraphic.setAttributes(attr); features.push(parcelGraphic); } }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.