2021-09-29 19:49:42 +02:00
|
|
|
<<<<<<< HEAD
|
2021-09-28 17:30:48 +02:00
|
|
|
import {Tiles} from "./Models/TileRange";
|
|
|
|
import OsmFeatureSource from "./Logic/FeatureSource/TiledFeatureSource/OsmFeatureSource";
|
|
|
|
import {Utils} from "./Utils";
|
2021-09-22 05:02:09 +02:00
|
|
|
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
|
2021-09-28 17:30:48 +02:00
|
|
|
import LayerConfig from "./Models/ThemeConfig/LayerConfig";
|
2021-07-28 02:51:07 +02:00
|
|
|
|
2021-09-28 17:30:48 +02:00
|
|
|
const allLayers: LayerConfig[] = []
|
|
|
|
const seenIds = new Set<string>()
|
|
|
|
for (const layoutConfig of AllKnownLayouts.layoutsList) {
|
|
|
|
if (layoutConfig.hideFromOverview) {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
for (const layer of layoutConfig.layers) {
|
|
|
|
if (seenIds.has(layer.id)) {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
seenIds.add(layer.id)
|
|
|
|
allLayers.push(layer)
|
|
|
|
}
|
|
|
|
}
|
2021-09-22 05:02:09 +02:00
|
|
|
|
2021-09-28 17:30:48 +02:00
|
|
|
console.log("All layer ids", allLayers.map(l => l.id))
|
2021-09-22 05:02:09 +02:00
|
|
|
|
2021-09-28 17:30:48 +02:00
|
|
|
const src = new OsmFeatureSource({
|
|
|
|
backend: "https://www.openstreetmap.org",
|
|
|
|
handleTile: tile => console.log("Got tile", tile),
|
|
|
|
allLayers: allLayers
|
2021-09-27 15:38:12 +02:00
|
|
|
})
|
2021-09-28 17:30:48 +02:00
|
|
|
src.LoadTile(16, 33354, 21875).then(geojson => {
|
|
|
|
console.log("Got geojson", geojson);
|
|
|
|
Utils.offerContentsAsDownloadableFile(JSON.stringify(geojson), "test.geojson", {
|
|
|
|
mimetype: "application/vnd.geo+json"
|
|
|
|
})
|
|
|
|
})
|
2021-09-29 19:49:42 +02:00
|
|
|
//*/
|
|
|
|
=======
|
2021-09-29 19:48:36 +02:00
|
|
|
import LocationInput from "./UI/Input/LocationInput";
|
|
|
|
import Loc from "./Models/Loc";
|
|
|
|
import {UIEventSource} from "./Logic/UIEventSource";
|
2021-07-28 02:51:07 +02:00
|
|
|
|
2021-09-29 19:48:36 +02:00
|
|
|
new LocationInput({
|
|
|
|
centerLocation: new UIEventSource<Loc>({
|
|
|
|
lat: 51.1110,
|
|
|
|
lon: 3.3701,
|
|
|
|
zoom : 14
|
|
|
|
})
|
|
|
|
}).SetStyle("height: 500px")
|
2021-09-29 19:49:42 +02:00
|
|
|
.AttachTo("maindiv");
|
|
|
|
>>>>>>> feature/animated-precise-input
|