Coder Social home page Coder Social logo

mmapp's People

Contributors

dellisd avatar

Watchers

 avatar  avatar

mmapp's Issues

Code generation for layer styling

Currently we have a DSL for building layers and defining their styles. This is fine, but requires defining a multiplatform-compatible implementation of style expressions which all need to be mapped to the platform-specific implementations at run time.

Alternatively, we could look at making use of code generation to avoid most of this work needing to be done at runtime. Layers could be defined in .json files which would be converted by the gradle plugin into the respective platform implementations directly. Those implementations could be imported immediately and used like normal, while still keeping the style definitions consistent between platforms.

Another nice advantage of using JSON to define the layers like this is that it becomes much easier to look up documentation for applying Mapbox styles, as their docs are written with a focus primarily on the JS syntax, which would be emulated directly in the JSON.

Runtime parameterization could also be accomplished by defining some kind of syntax (maybe prefixing variables with a $ character) to allow the plugin to generate a function with the specified parameters that would return an instance of the layer that has those parameters filled in.

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.