Coder Social home page Coder Social logo

Custom schemes about map-machine HOT 5 OPEN

mfbehrens99 avatar mfbehrens99 commented on June 19, 2024
Custom schemes

from map-machine.

Comments (5)

enzet avatar enzet commented on June 19, 2024

No problems at all, I should definitely add this option.

The scheme format however is still under development and not documented. If you want to create custom scheme, please feel free to ask questions.

from map-machine.

mfbehrens99 avatar mfbehrens99 commented on June 19, 2024

Definitively, do not really understand it. Just tried an empty scheme and I failed. I only added the color definition from the default scheme in what made the program work. However, there are still a lot of objects on the map. Shouldn't an empty scheme result in an empty map?

from map-machine.

enzet avatar enzet commented on June 19, 2024

I only added the color definition from the default scheme in what made the program work.

This is indeed a bug. Totally empty scheme file should work. I'll fix it.

Shouldn't an empty scheme result in an empty map?

Hmm... Looks like very legal assumption.

Honestly, I never thought about such a use case. Map Machine just tries to render everything no matter how and this behavior isn't manageable through scheme file.

from map-machine.

mfbehrens99 avatar mfbehrens99 commented on June 19, 2024

Still throws an error message :(

(.env) C:\Users\mfbeh\Documents\Github\map-machine>map-machine render -b=8.4214801253,49.0197665932,8.4230425121,49.0205831971 -z=21 --scheme=map_machine/scheme/empty.yml
Traceback (most recent call last):
  File "C:\Users\mfbeh\Documents\Github\map-machine\.env\Scripts\map-machine-script.py", line 33, in <module>
    sys.exit(load_entry_point('map-machine', 'console_scripts', 'map-machine')())
  File "c:\users\mfbeh\documents\github\map-machine\map_machine\main.py", line 44, in main
    mapper.render_map(arguments)
  File "c:\users\mfbeh\documents\github\map-machine\map_machine\mapper.py", line 270, in render_map
    scheme: Scheme = Scheme.from_file(scheme_path)
  File "c:\users\mfbeh\documents\github\map-machine\map_machine\scheme.py", line 375, in from_file
    return cls(content)
  File "c:\users\mfbeh\documents\github\map-machine\map_machine\scheme.py", line 319, in __init__
    if "node_icons" in content:
TypeError: argument of type 'NoneType' is not iterable```

from map-machine.

enzet avatar enzet commented on June 19, 2024

Hm, seems like YAML failed to load the file. Could you please dump the content of map_machine/scheme/empty.yml?

Update: oh, I see, it is just totally empty, which is presumably a valid YAML file. I'll check this.

from map-machine.

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.