Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Get rid of user-specified refs #6900

Closed
Closed

Activity

  1. added
    GL JS parity
    on Nov 3, 2016
  2. jfirebaugh commented on Dec 23, 2016

    @jfirebaugh
    ContributorAuthor

    groupByLayout turns out to be extraordinarily difficult to port to C++. I've considered three different approaches:

    • Grouping using an unordered_map or unordered_multiset. This requires implementing a hash function for Layer, Filter, LayoutProperties, PropertyValue, Function, and all types used by those types. I got deep into the weeds of trying to make std::hash and boost::hash cooperate before abandoning this approach.
    • Grouping using a map or multiset. This requires implementing a less than operator for Layer, Filter, LayoutProperties, PropertyValue, Function, and all types used by those types. This seems easier until you discover that unordered_map (used by mapbox::geometry::value, which is used by Filter) doesn't provide a less than operator.
    • Following the JS implementation exactly, and implementing (stable) JSON stringify for all these types. This seems equally if not more daunting than either of the above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GL JS parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions