| 1 | meta
|
|---|
| 2 | {
|
|---|
| 3 | title: "MapWithAI";
|
|---|
| 4 | description: "Visualization of MapWithAI data";
|
|---|
| 5 | icon: "mapwithai.svg";
|
|---|
| 6 | author: "Taylor Smock";
|
|---|
| 7 | version: "1.19_2021-03-23";
|
|---|
| 8 | min-josm-version: "15229";
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | /********************************
|
|---|
| 12 | * Settings for the paint style *
|
|---|
| 13 | ********************************/
|
|---|
| 14 | @supports (min-josm-version: 15289) {
|
|---|
| 15 | settings::show_all {
|
|---|
| 16 | label: tr("Show possible MapWithAI objects");
|
|---|
| 17 | }
|
|---|
| 18 | settings::colors {
|
|---|
| 19 | label: tr("Source Colors");
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | setting::show_new {
|
|---|
| 25 | type: boolean;
|
|---|
| 26 | label: tr("New");
|
|---|
| 27 | default: true;
|
|---|
| 28 | group: "show_all";
|
|---|
| 29 | }
|
|---|
| 30 | setting::show_modified {
|
|---|
| 31 | type: boolean;
|
|---|
| 32 | label: tr("Modified");
|
|---|
| 33 | default: false;
|
|---|
| 34 | group: "show_all";
|
|---|
| 35 | }
|
|---|
| 36 | setting::show_old {
|
|---|
| 37 | type: boolean;
|
|---|
| 38 | label: tr("Pre-existing");
|
|---|
| 39 | default: false;
|
|---|
| 40 | group: "show_all";
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | setting::decemberHolidayStyle {
|
|---|
| 44 | type: boolean;
|
|---|
| 45 | label: tr("Mappy Holidays!");
|
|---|
| 46 | default: false;
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | /* This requires support in the plugin (will read key for mapwithai.mapcss:boolean:toggle_with_layer) */
|
|---|
| 50 | setting::toggle_with_layer {
|
|---|
| 51 | type: boolean;
|
|---|
| 52 | label: tr("Toggle paintstyle on/off with layer");
|
|---|
| 53 | default: true;
|
|---|
| 54 | }
|
|---|
| 55 |
|
|---|
| 56 | /************************************
|
|---|
| 57 | * End Settings for the paint style *
|
|---|
| 58 | ************************************/
|
|---|
| 59 |
|
|---|
| 60 | /***************************************************
|
|---|
| 61 | * Set .mapwithai for all known MapWithAI datasets *
|
|---|
| 62 | ***************************************************/
|
|---|
| 63 |
|
|---|
| 64 | way["source"][regexp_test(concat("^(", JOSM_pref("mapwithai.mappaint.sources", "microsoft/.*|digitalglobe|maxar|esri/.*"), ")$"), tag("source"))][setting("show_new")]:new,
|
|---|
| 65 | way["mapwithai:source"][setting("show_new")] {
|
|---|
| 66 | set .mapwithai;
|
|---|
| 67 | set_color: JOSM_pref(concat("mapwithai.mappaint.", any(tag("source"), tag("mapwithai:source")), "_new"), #FF00FF);
|
|---|
| 68 | }
|
|---|
| 69 | way["source"][regexp_test(concat("^(", JOSM_pref("mapwithai.mappaint.sources", "microsoft/.*|digitalglobe|maxar|esri/.*"), ")$"), tag("source"))][setting("show_old")]!:new!:modified,
|
|---|
| 70 | way["mapwithai:source"][setting("show_old")]!:new!:modified {
|
|---|
| 71 | set .mapwithai;
|
|---|
| 72 | set_color: JOSM_pref(concat("mapwithai.mappaint.", any(tag("source"), tag("mapwithai:source")), "_old"), #FF00FF);
|
|---|
| 73 | }
|
|---|
| 74 | way[regexp_test(concat("^(", JOSM_pref("mapwithai.mappaint.sources", "microsoft/.*|digitalglobe|maxar|esri/.*"), ")$"), tag("source"))][setting("show_modified")]:modified,
|
|---|
| 75 | way["mapwithai:source"][setting("show_modified")]:modified {
|
|---|
| 76 | set .mapwithai;
|
|---|
| 77 | set_color: JOSM_pref(concat("mapwithai.mappaint.", any(tag("source"), tag("mapwithai:source")), "_modified"), #FF00FF);
|
|---|
| 78 | }
|
|---|
| 79 |
|
|---|
| 80 | way.mapwithai {
|
|---|
| 81 | color: any(prop("set_color_programatic"), prop("set_color"));
|
|---|
| 82 | }
|
|---|
| 83 |
|
|---|
| 84 | way.mapwithai:closed2 {
|
|---|
| 85 | fill-color: any(prop("set_color_programatic"), prop("set_color"));
|
|---|
| 86 | }
|
|---|
| 87 |
|
|---|
| 88 | way.mapwithai[setting("decemberHolidayStyle")] {
|
|---|
| 89 | holidayColour: CRC32_checksum(osm_id()) > 2147483647.5
|
|---|
| 90 | }
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 | /*****************
|
|---|
| 94 | * Holiday Theme *
|
|---|
| 95 | *****************/
|
|---|
| 96 | way.mapwithai[is_prop_set("holidayColour") && prop("holidayColour")] {
|
|---|
| 97 | color: mapwithaiDecemberGreen#00FF00;
|
|---|
| 98 | dashes: 20;
|
|---|
| 99 | dashes-background-color: mapwithaiDecemberWhite#FFFFFF;
|
|---|
| 100 | }
|
|---|
| 101 | way.mapwithai[is_prop_set("holidayColour") && !prop("holidayColour")] {
|
|---|
| 102 | color: mapwithaiDecemberRed#FC6262;
|
|---|
| 103 | dashes: 20;
|
|---|
| 104 | dashes-background-color: mapwithaiDecemberWhite#FFFFFF;
|
|---|
| 105 | }
|
|---|
| 106 | way.mapwithai[is_prop_set("holidayColour") && prop("holidayColour")]:closed2 {
|
|---|
| 107 | fill-color: mapwithaiDecemberGreen#00FF00;
|
|---|
| 108 | }
|
|---|
| 109 | way.mapwithai[is_prop_set("holidayColour") && !prop("holidayColour")]:closed2 {
|
|---|
| 110 | fill-color: mapwithaiDecemberRed#FC6262;
|
|---|
| 111 | }
|
|---|
| 112 |
|
|---|
| 113 | way.mapwithai[is_prop_set("holidayColour")]:selected {
|
|---|
| 114 | color: mapWithAIDecemberSelected#FF0000;
|
|---|
| 115 | dashes: 0;
|
|---|
| 116 | }
|
|---|
| 117 | /*********************
|
|---|
| 118 | * End Holiday Theme *
|
|---|
| 119 | *********************/
|
|---|