Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alerts/ Support Multipoint #874

Open
1 task
ximenabb opened this issue Dec 3, 2024 · 4 comments
Open
1 task

Alerts/ Support Multipoint #874

ximenabb opened this issue Dec 3, 2024 · 4 comments

Comments

@ximenabb
Copy link
Contributor

ximenabb commented Dec 3, 2024

The front-end code (PR#844) supports displaying alerts of type Point, LineString, MultiLineString, Polygon and MultiPolygon.
It does not support MultiPoint

ToDo

  • Add support of MultiPoint
@EvanHahn
Copy link
Contributor

EvanHahn commented Dec 3, 2024

Haven't tested it, but I think this is all that's required in src/frontend/screens/MapScreen/MapLayers/RemoteDetectionAlertsLayer.tsx:

@@ -31,6 +31,7 @@ export const RemoteDectionAlertsMapLayer = () => {
             'Point',
             'MultiLineString',
             'MultiPolygon',
+            'MultiPoint',
           ],
           ['has', 'metadata.alert_type'],
           ['has', 'month_detec'],
@@ -59,7 +60,7 @@ export const RemoteDectionAlertsMapLayer = () => {
       {/* Circle Layer for Points */}
       <MapboxGL.CircleLayer
         id="comapeo-alerts-point"
-        filter={['==', '$type', 'Point']}
+        filter={['in', '$type', 'Point', 'MultiPoint']}
         style={{
           circleRadius: 5,
           circleColor: '#FF0000',

@ErikSin
Copy link
Contributor

ErikSin commented Dec 4, 2024

We could do it the way that Evan has recommended, the only thing is that it would be in-distinguishable from normal points. Does the CMI team want them styled differently (aka Not red dots) from the other alerts?

@ximenabb
Copy link
Contributor Author

ximenabb commented Dec 4, 2024

@ErikSin they can be the same style (red dot) as other alerts

@gmaclennan
Copy link
Member

Yes, generally there should be no need to style Multi geometry variants differently than their non-multi versions, e.g. Line and MultiLine should be the same, Polygon and MultiPolygon should be the same, and Point and MultiPoint should be the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants