WIP on external presets

- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
This commit is contained in:
Bryan Housel
2020-02-05 09:38:26 -05:00
parent a333a341ec
commit 0fe766d9a4
21 changed files with 1435 additions and 1435 deletions
+1 -13
View File
@@ -1,16 +1,4 @@
export { dataLocales } from './locales.json';
export { en as dataEn } from '../dist/locales/en.json';
import { presets } from './presets/presets.json';
import { defaults } from './presets/defaults.json';
import { categories } from './presets/categories.json';
import { fields } from './presets/fields.json';
export let data = {
presets: {
presets: presets,
defaults: defaults,
categories: categories,
fields: fields
}
};
export let data = {};
+221 -223
View File
@@ -1,226 +1,224 @@
{
"categories": {
"category-barrier": {
"icon": "maki-roadblock",
"name": "Barrier Features",
"members": [
"barrier/fence",
"barrier/wall",
"barrier/ditch",
"barrier/gate",
"barrier/hedge",
"barrier/kerb",
"barrier"
]
},
"category-building": {
"icon": "maki-building",
"name": "Building Features",
"members": [
"building",
"building/house",
"building/apartments",
"building/garage",
"building/retail",
"building/commercial",
"building/industrial",
"building/residential"
]
},
"category-golf": {
"icon": "maki-golf",
"name": "Golf Features",
"members": [
"golf/fairway",
"golf/green",
"golf/lateral_water_hazard",
"golf/rough",
"golf/bunker",
"golf/tee",
"golf/water_hazard",
"golf/driving_range",
"golf/hole",
"golf/cartpath",
"golf/path"
]
},
"category-landuse": {
"icon": "maki-landuse",
"name": "Land Use Features",
"members": [
"landuse/residential",
"landuse/industrial",
"landuse/commercial",
"landuse/retail",
"landuse/farmland",
"landuse/farmyard",
"landuse/forest",
"landuse/meadow",
"landuse/aquaculture",
"landuse/cemetery",
"landuse/military",
"landuse/religious"
]
},
"category-natural": {
"icon": "maki-natural",
"name": "Natural Features",
"members": [
"natural/water",
"natural/wood",
"natural/scrub",
"natural/wetland",
"natural/grassland",
"natural/heath",
"natural/bare_rock",
"natural/beach",
"natural/cave_entrance",
"natural/glacier",
"natural/coastline",
"natural/tree_row",
"natural/peak",
"natural/cliff"
]
},
"category-path": {
"icon": "temaki-pedestrian",
"name": "Paths",
"members": [
"highway/path",
"highway/footway",
"highway/footway/marked",
"highway/footway/sidewalk",
"highway/steps",
"highway/cycleway",
"highway/bridleway",
"highway/pedestrian_line"
]
},
"category-rail": {
"icon": "temaki-railway_track",
"name": "Rails",
"members": [
"railway/rail",
"railway/disused",
"railway/tram",
"railway/subway",
"railway/narrow_gauge",
"railway/light_rail",
"railway/monorail",
"railway/funicular"
]
},
"category-restriction": {
"icon": "iD-restriction",
"name": "Restriction Features",
"members": [
"type/restriction/no_left_turn",
"type/restriction/no_right_turn",
"type/restriction/no_straight_on",
"type/restriction/no_u_turn",
"type/restriction/only_left_turn",
"type/restriction/only_right_turn",
"type/restriction/only_straight_on",
"type/restriction/only_u_turn",
"type/restriction"
]
},
"category-road_major": {
"icon": "iD-highway-unclassified",
"name": "Major Roads",
"members": [
"highway/motorway",
"highway/trunk",
"highway/primary",
"highway/secondary",
"highway/tertiary",
"highway/motorway_link",
"highway/trunk_link",
"highway/primary_link",
"highway/secondary_link",
"highway/tertiary_link"
]
},
"category-road_minor": {
"icon": "iD-highway-unclassified",
"name": "Minor Roads",
"members": [
"highway/unclassified",
"highway/residential",
"highway/living_street",
"highway/service",
"highway/track"
]
},
"category-road_service": {
"icon": "iD-highway-service",
"name": "Service Roads",
"members": [
"highway/service",
"highway/service/parking_aisle",
"highway/service/driveway",
"highway/service/alley",
"highway/service/emergency_access",
"highway/service/drive-through"
]
},
"category-route": {
"icon": "iD-route",
"name": "Route Features",
"members": [
"type/route/road",
"type/route/bicycle",
"type/route/foot",
"type/route/hiking",
"type/route/horse",
"type/route/piste",
"type/route/bus",
"type/route/train",
"type/route/light_rail",
"type/route/tram",
"type/route/subway",
"type/route/ferry",
"type/route/power",
"type/route/pipeline",
"type/route/detour",
"type/route_master",
"type/route"
]
},
"category-utility": {
"icon": "iD-power-line",
"name": "Utility Features",
"members": [
"power/line",
"power/minor_line",
"man_made/pipeline",
"power/cable/underground"
]
},
"category-water": {
"icon": "maki-water",
"name": "Water Bodies",
"members": [
"natural/water",
"natural/water/pond",
"natural/water/basin",
"natural/water/lake",
"natural/water/reservoir"
]
},
"category-waterway": {
"icon": "iD-waterway-stream",
"name": "Waterways",
"members": [
"waterway/stream",
"waterway/drain",
"waterway/river",
"waterway/canal",
"waterway/ditch",
"natural/water/stream",
"natural/water/river",
"natural/water/canal"
]
}
"category-barrier": {
"icon": "maki-roadblock",
"name": "Barrier Features",
"members": [
"barrier/fence",
"barrier/wall",
"barrier/ditch",
"barrier/gate",
"barrier/hedge",
"barrier/kerb",
"barrier"
]
},
"category-building": {
"icon": "maki-building",
"name": "Building Features",
"members": [
"building",
"building/house",
"building/apartments",
"building/garage",
"building/retail",
"building/commercial",
"building/industrial",
"building/residential"
]
},
"category-golf": {
"icon": "maki-golf",
"name": "Golf Features",
"members": [
"golf/fairway",
"golf/green",
"golf/lateral_water_hazard",
"golf/rough",
"golf/bunker",
"golf/tee",
"golf/water_hazard",
"golf/driving_range",
"golf/hole",
"golf/cartpath",
"golf/path"
]
},
"category-landuse": {
"icon": "maki-landuse",
"name": "Land Use Features",
"members": [
"landuse/residential",
"landuse/industrial",
"landuse/commercial",
"landuse/retail",
"landuse/farmland",
"landuse/farmyard",
"landuse/forest",
"landuse/meadow",
"landuse/aquaculture",
"landuse/cemetery",
"landuse/military",
"landuse/religious"
]
},
"category-natural": {
"icon": "maki-natural",
"name": "Natural Features",
"members": [
"natural/water",
"natural/wood",
"natural/scrub",
"natural/wetland",
"natural/grassland",
"natural/heath",
"natural/bare_rock",
"natural/beach",
"natural/cave_entrance",
"natural/glacier",
"natural/coastline",
"natural/tree_row",
"natural/peak",
"natural/cliff"
]
},
"category-path": {
"icon": "temaki-pedestrian",
"name": "Paths",
"members": [
"highway/path",
"highway/footway",
"highway/footway/marked",
"highway/footway/sidewalk",
"highway/steps",
"highway/cycleway",
"highway/bridleway",
"highway/pedestrian_line"
]
},
"category-rail": {
"icon": "temaki-railway_track",
"name": "Rails",
"members": [
"railway/rail",
"railway/disused",
"railway/tram",
"railway/subway",
"railway/narrow_gauge",
"railway/light_rail",
"railway/monorail",
"railway/funicular"
]
},
"category-restriction": {
"icon": "iD-restriction",
"name": "Restriction Features",
"members": [
"type/restriction/no_left_turn",
"type/restriction/no_right_turn",
"type/restriction/no_straight_on",
"type/restriction/no_u_turn",
"type/restriction/only_left_turn",
"type/restriction/only_right_turn",
"type/restriction/only_straight_on",
"type/restriction/only_u_turn",
"type/restriction"
]
},
"category-road_major": {
"icon": "iD-highway-unclassified",
"name": "Major Roads",
"members": [
"highway/motorway",
"highway/trunk",
"highway/primary",
"highway/secondary",
"highway/tertiary",
"highway/motorway_link",
"highway/trunk_link",
"highway/primary_link",
"highway/secondary_link",
"highway/tertiary_link"
]
},
"category-road_minor": {
"icon": "iD-highway-unclassified",
"name": "Minor Roads",
"members": [
"highway/unclassified",
"highway/residential",
"highway/living_street",
"highway/service",
"highway/track"
]
},
"category-road_service": {
"icon": "iD-highway-service",
"name": "Service Roads",
"members": [
"highway/service",
"highway/service/parking_aisle",
"highway/service/driveway",
"highway/service/alley",
"highway/service/emergency_access",
"highway/service/drive-through"
]
},
"category-route": {
"icon": "iD-route",
"name": "Route Features",
"members": [
"type/route/road",
"type/route/bicycle",
"type/route/foot",
"type/route/hiking",
"type/route/horse",
"type/route/piste",
"type/route/bus",
"type/route/train",
"type/route/light_rail",
"type/route/tram",
"type/route/subway",
"type/route/ferry",
"type/route/power",
"type/route/pipeline",
"type/route/detour",
"type/route_master",
"type/route"
]
},
"category-utility": {
"icon": "iD-power-line",
"name": "Utility Features",
"members": [
"power/line",
"power/minor_line",
"man_made/pipeline",
"power/cable/underground"
]
},
"category-water": {
"icon": "maki-water",
"name": "Water Bodies",
"members": [
"natural/water",
"natural/water/pond",
"natural/water/basin",
"natural/water/lake",
"natural/water/reservoir"
]
},
"category-waterway": {
"icon": "iD-waterway-stream",
"name": "Waterways",
"members": [
"waterway/stream",
"waterway/drain",
"waterway/river",
"waterway/canal",
"waterway/ditch",
"natural/water/stream",
"natural/water/river",
"natural/water/canal"
]
}
}
+59 -61
View File
@@ -1,63 +1,61 @@
{
"defaults": {
"area": [
"category-landuse",
"category-building",
"category-water",
"category-natural",
"leisure/park",
"amenity/hospital",
"amenity/place_of_worship",
"amenity/cafe",
"amenity/restaurant",
"area"
],
"line": [
"category-road_major",
"category-road_minor",
"category-rail",
"category-path",
"category-waterway",
"category-barrier",
"category-natural",
"category-utility",
"line"
],
"point": [
"category-natural",
"leisure/park",
"amenity/hospital",
"amenity/place_of_worship",
"amenity/cafe",
"amenity/restaurant",
"amenity/fast_food",
"amenity/bar",
"amenity/bank",
"shop/supermarket",
"point"
],
"vertex": [
"highway/crossing/marked",
"highway/crossing/unmarked",
"railway/level_crossing",
"highway/traffic_signals",
"highway/turning_circle",
"highway/turning_loop",
"traffic_calming",
"highway/mini_roundabout",
"highway/motorway_junction",
"point"
],
"relation": [
"category-route",
"category-restriction",
"public_transport/stop_area",
"type/boundary",
"type/waterway",
"type/multipolygon",
"type/enforcement",
"type/site",
"relation"
]
}
"area": [
"category-landuse",
"category-building",
"category-water",
"category-natural",
"leisure/park",
"amenity/hospital",
"amenity/place_of_worship",
"amenity/cafe",
"amenity/restaurant",
"area"
],
"line": [
"category-road_major",
"category-road_minor",
"category-rail",
"category-path",
"category-waterway",
"category-barrier",
"category-natural",
"category-utility",
"line"
],
"point": [
"category-natural",
"leisure/park",
"amenity/hospital",
"amenity/place_of_worship",
"amenity/cafe",
"amenity/restaurant",
"amenity/fast_food",
"amenity/bar",
"amenity/bank",
"shop/supermarket",
"point"
],
"vertex": [
"highway/crossing/marked",
"highway/crossing/unmarked",
"railway/level_crossing",
"highway/traffic_signals",
"highway/turning_circle",
"highway/turning_loop",
"traffic_calming",
"highway/mini_roundabout",
"highway/motorway_junction",
"point"
],
"relation": [
"category-route",
"category-restriction",
"public_transport/stop_area",
"type/boundary",
"type/waterway",
"type/multipolygon",
"type/enforcement",
"type/site",
"relation"
]
}