Giter Site home page Giter Site logo

Comments (6)

mfazekas avatar mfazekas commented on May 7, 2024 2

@HPieters yes thanks for the issue i hope i've clarified it in migrations notes in changelog

from maps.

HPieters avatar HPieters commented on May 7, 2024

I might have created this issue to soon as I see that MapboxGL.StyleSheet.create has been removed? If I check #4 it seems I can just use objects?

from maps.

HPieters avatar HPieters commented on May 7, 2024

@mfazekas Thanks! Perhaps a bit offtopic but how to I rewrite

iconOpacity: MapboxGL.StyleSheet.source([[0, 0.5], [1, 1]], 'active', MapboxGL.InterpolationMode.Categorical),
iconSize: MapboxGL.StyleSheet.source([[0, 0], [1, 1]], 'iconSize', MapboxGL.InterpolationMode.linear),

from maps.

HPieters avatar HPieters commented on May 7, 2024

And maybe we should remove / update https://github.com/react-native-mapbox/maps/blob/3bbd813020f935ec3cb36f6348e13082a3ac6422/docs/StyleSheet.md

from maps.

mfazekas avatar mfazekas commented on May 7, 2024

Something like this might work (not tested), let me know if works so we can add to docs as samples

iconOpacity: [
    'step',
    ['get', 'active'],
    0.5,
    1, 1.0,
],
iconSize: [
   'interpolate',
   ['linear'],
   ['get','iconSize'],
   0, 0,
   1, 1,
],

see also https://docs.mapbox.com/mapbox-gl-js/style-spec/#expressions-interpolate and https://docs.mapbox.com/mapbox-gl-js/style-spec/#expressions-step

from maps.

HPieters avatar HPieters commented on May 7, 2024

Seems to work great, thanks once again!

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.