Giter VIP home page Giter VIP logo

custom-model-editor's Introduction

development

# initially do
npm install
# update build whenever a file changes
npm run watch
# -> open demo/index.html or start live server etc.

# ... or keep running the tests while developing
npm run test-watch

# before you commit build the distribution as well (at least as long as we keep the distribution in VCS)
npm run build

custom-model-editor's People

Contributors

easbar avatar karussell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

custom-model-editor's Issues

Add some missing features

  • negative numbers in operator expressions like max_speed * -0.2
  • encoded value expressions like <ev>.ordinal() and edge.getDistance() (both numeric)
  • some math functions like Math.abs/sqrt
  • boolean encoded value-like expressions like edge.getName().contains("xyz")

See here what is allowed on the server side: https://github.com/graphhopper/graphhopper/blob/2140131ec079e21b7e7f05865a3b77913b0d9acc/core/src/main/java/com/graphhopper/routing/weighting/custom/ConditionalExpressionVisitor.java#L41-L42

No suggestions for clause or operator values before typing "

For example pressing Ctrl+Space with the cursor placed behind "if": we do not get any suggestions. We need to type " first to make it work. Previously it was possible to use boolean true/false here (without "). Maybe that's why. But this is no longer allowed anyway. Same thing for operator values where we used to allow numbers like 100 instead of strings like "100". So we probably do not get suggestions when the cursor is placed behind "limit_to": for the same reasons.

when using small_truck_access the getUsedCategories method returns truck_access too it seems

I tested the RoadsTagParser with the RHS expression and used something like

{
  "speed": [{
          "if": "true",
          "limit_to": "small_truck_average_speed"
        }, {        
          "else_if": "small_truck_access==false && something",
          "multiply_by": "0"
        }, { ... }
  ]
}

as the custom_model but the request failed with

You requested the details
[road_class, small_truck_access, truck_access, average_speed, distance, time] but we could only find
[road_class, small_truck_access, average_speed, distance, time]

Probably the RHS stuff is unrelated and the problem is that we do no longer contain the $ in these encoded value? Before it was small_truck$average_speed and small_truck$access.

In production I will include a hack so that I can continue using it for this special case :) (so test this only on a local instance please )

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.