We're trying to troubleshoot an issue where after creating the notification buffer, only one parcel is selected. The sample viewer shows all parcels within the buffer selected. Has anyone else noted similar behavior? Could this be a result of multipart parcel polygons?Thanks,Michael Parma
function DrawPolygon(features) { var lineColor = new dojo.Color(); lineColor.setColor(rendererColor); var fillColor = new dojo.Color(); fillColor.setColor(rendererColor); fillColor.a = 0.25; var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, lineColor, 3), fillColor); var qglayer = map.getLayer(queryGraphicLayer); map.graphics.clear(); var graphicCollection = []; var attributeCollection = []; //console.log(features) for (var i = 0; i < features.length; i++) { if (attributeCollection[features.attributes.PARCELID]) { attributeCollection[features.attributes.PARCELID].push({ id: features.attributes.PARCELID, name: features.attributes }); } else { attributeCollection[features.attributes.PARCELID] = []; graphicCollection[features.attributes.PARCELID] = features.geometry; attributeCollection[features.attributes.PARCELID].push({ id: features.attributes.PARCELID, name: features.attributes }); } } for (var lowerParcelID in attributeCollection) { var featureData = attributeCollection[lowerParcelID]; var parcelAttributeData = []; if (featureData.length > 1) { for (var i = 0; i < featureData.length; i++) { parcelAttributeData[featureData.id] = featureData.name; } } else { parcelAttributeData = featureData[0].name; } var graphic = new esri.Graphic(graphicCollection[lowerParcelID], symbol, parcelAttributeData); qglayer.add(graphic); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.