mapcomplete/test.ts

42 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-07-13 11:26:50 +02:00
import SplitRoadWizard from "./UI/Popup/SplitRoadWizard";
2021-06-28 18:06:54 +02:00
import State from "./State";
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
2021-07-13 16:11:57 +02:00
const way = {
"type": "Feature",
"properties": {
"id": "way/1234",
"highway": "residential",
"cyclestreet": "yes"
},
"geometry": {
"type": "LineString",
"coordinates": [
[
4.488961100578308,
51.204971024401374
],
[
4.4896745681762695,
51.204712226516435
],
[
4.489814043045044,
51.20459459063348
],
[
4.48991060256958,
51.204439983016115
],
[
4.490291476249695,
51.203845074952376
]
]
}
}
State.state = new State(AllKnownLayouts.allKnownLayouts.get("fietsstraten"));
// add road to state
State.state.allElements.addOrGetElement(way);
2021-07-13 11:26:50 +02:00
new SplitRoadWizard("way/1234").AttachTo("maindiv")