Select to view content in your preferred language

How to highlight radius?

243
0
02-21-2022 08:41 PM
altair
by
New Contributor III

This is my code, my problem is I cant configure it out , when the zoom level is below 5 it doesnt work, and when the zoom level is above 5 it works well.

 

        layerView.queryFeatures(threatQuery).then((response) => {
                     const { geometry, attributes } = response.features[0];

                     const threatGeometry = ThreatPin({
                                active: true,
                                attributes: attributes,
                                geometry: geometry,
                      });
                     setActiveThreat({
                               highlighted: threatGeometry,
                              threatId: threatId,
                      });
                      mapDiv.current.activeThreat = {
                                 highlighted: threatGeometry,
                                 threatId: threatId,
                       };
                     mapDiv.current.center = geometry.centroid
                        ? [geometry.centroid.longitude, geometry.centroid.latitude]
                        : [geometry.longitude, geometry.latitude];
                        mapDiv.current.graphics.add(threatGeometry);
        });
0 Kudos
0 Replies