Skip to content

F map marker color config

Timm Fitschen requested to merge f-map-marker-color-config into dev

Summary

Minimal enhancement to make the marker colors configurable (for the entities on the map) as requested per caosdb/customers/leibniz-zmt/management#127

Focus

Leaflet has a particular data structure (DivIcon_options) for the configuration of the map markers. We just use that and read it out from the config.

Test Environment

Use a normal map.json configuration and merge it with

{
    "entityLayers": {
        "current_page_entities": {
            "icon_options": {
                "html": "<i class=\"bi-geo-alt-fill\"  style=\"font-size: 20px; color: teal;\"></i>"
            }
        },
        "all_map_entities": {
            "icon_options": {
                "html": "<i class=\"bi-geo-alt-fill\"  style=\"font-size: 20px; color: brown;\"></i>"
            }
        }
    }
}  

You should now see the icons in brown and teal, instead of red and blue.

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related issues
  • Up-to-date CHANGELOG.md (or not necessary)
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md (or not necessary)
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there specifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Florian Spreckelsen

Merge request reports

Loading