zakjan / mapbox-gl-draw-geodesic

Geodesic plugin for Mapbox GL Draw
https://zakjan.github.io/mapbox-gl-draw-geodesic/
MIT License
51 stars 8 forks source link

Feature Request: Uniquely style geodesic points #11

Open jaybo opened 2 years ago

jaybo commented 2 years ago

I'm trying to show a dot at the vertices of a line_string, but not at the added geodesic points. So I'm trying to figure out if there's any "meta" setting which can be used in the style to filter out the geodesic points (while still showing dots at the original vertices), like:

  // this puts a dot at original vertices AND geodesic points

  id: "gl-draw-line-static-vertices",
  type: "circle",
  filter: [
      "all",
      ["==", "$type", "LineString"],
      ["==", "active", "false"],
      ["==", "mode", "static"],
  ],

I was hoping I could do something like:

  filter: [
      "all",
      ["==", "$type", "LineString"],
      ["!=", "meta", "geodesic"],   // ANY WAY TO DO A FILTER LIKE THIS?
      ["==", "active", "false"],
      ["==", "mode", "static"],
  ],

Is this possible?

zakjan commented 2 years ago

Hi @jaybo, thanks for the idea! I'm not sure whether it's possible, could you investigate it, and possibly send a PR?