forked from MapComplete/MapComplete
Small tweaks
This commit is contained in:
parent
4fcd3523b7
commit
e904043069
6 changed files with 27 additions and 75 deletions
50
test.ts
50
test.ts
|
@ -1,50 +1,2 @@
|
|||
<<<<<<< HEAD
|
||||
import {Tiles} from "./Models/TileRange";
|
||||
import OsmFeatureSource from "./Logic/FeatureSource/TiledFeatureSource/OsmFeatureSource";
|
||||
import {Utils} from "./Utils";
|
||||
import {AllKnownLayouts} from "./Customizations/AllKnownLayouts";
|
||||
import LayerConfig from "./Models/ThemeConfig/LayerConfig";
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
console.log("All layer ids", allLayers.map(l => l.id))
|
||||
|
||||
const src = new OsmFeatureSource({
|
||||
backend: "https://www.openstreetmap.org",
|
||||
handleTile: tile => console.log("Got tile", tile),
|
||||
allLayers: allLayers
|
||||
})
|
||||
src.LoadTile(16, 33354, 21875).then(geojson => {
|
||||
console.log("Got geojson", geojson);
|
||||
Utils.offerContentsAsDownloadableFile(JSON.stringify(geojson), "test.geojson", {
|
||||
mimetype: "application/vnd.geo+json"
|
||||
})
|
||||
})
|
||||
//*/
|
||||
=======
|
||||
import LocationInput from "./UI/Input/LocationInput";
|
||||
import Loc from "./Models/Loc";
|
||||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
|
||||
new LocationInput({
|
||||
centerLocation: new UIEventSource<Loc>({
|
||||
lat: 51.1110,
|
||||
lon: 3.3701,
|
||||
zoom : 14
|
||||
})
|
||||
}).SetStyle("height: 500px")
|
||||
.AttachTo("maindiv");
|
||||
>>>>>>> feature/animated-precise-input
|
||||
import {Translation} from "./UI/i18n/Translation";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue