Giter VIP home page Giter VIP logo

Comments (7)

mfazekas avatar mfazekas commented on May 22, 2024 2

It turns out in and '==',$type is legacy filter syntax, and it's no longer supported. Use the new expression syntax to get it work:

["all",
    ["==",["geometry-type"], "Point"],
    ["match",
       ["get", "type"],
       ["Blue Project", "WFW Project"], true,
        false]
]

"!has" is legacy filter syntax too use ["!", ["has" ...]

from maps.

mfazekas avatar mfazekas commented on May 22, 2024 1

Bug was reported to upstream repo: mapbox/mapbox-gl-native#14805

from maps.

lpfunding avatar lpfunding commented on May 22, 2024 1

Would this issue hinder the EarthQuakes.js example from working? I tried to build it in the exact same way, but the app crashes everytime I launch...

Any idea how long this bug will take to fix?

I believe this issue also exists in SymbolLayer!

from maps.

mfazekas avatar mfazekas commented on May 22, 2024 1

@lpfunding it seems that ios mapbox-gl-native have trouble with !has too - to be reported on upstream repo.

instead of

filter={['!has', 'point_count']}

you can try:

filter={['!', ['has', 'point_count']]}

from maps.

mfazekas avatar mfazekas commented on May 22, 2024

@systemlevel seems to be an upstream mapbox-native-gl / ios issue. The expression is converted to NSPredicate then back to mapbox expression.

[
                'all',
                ['==', '$type', 'Point'],
                ['in', 'type', 'Blue Project', 'WFW Project']
            ]

Becomes NSPredicate predicateWithMGLJSONObject

"$type" == "Point" AND MGL_FUNCTION("in", "type", "Blue Project", "WFW Project") == 1

Which becomes predicate mgl_jsonExpressionObject

[
                'all',
                ['==', '$type', 'Point'],
                ['==', ['in', 'type', 'Blue Project', 'WFW Project'], 1],
            ]

And then it fails to parse this expression.

from maps.

systemlevel avatar systemlevel commented on May 22, 2024

@mfazekas thanks so much for reporting that upstream.

from maps.

mfazekas avatar mfazekas commented on May 22, 2024

The "!has" issue was reported to upstream: mapbox/mapbox-gl-native#14861

from maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.