forked from MapComplete/MapComplete
Refactoring: move special visualisations into multiple files
This commit is contained in:
parent
f057b0f358
commit
b9bc3f5980
14 changed files with 839 additions and 801 deletions
|
|
@ -1,13 +1,14 @@
|
|||
import { GeoOperations } from "../../Logic/GeoOperations"
|
||||
import { ImmutableStore, UIEventSource } from "../../Logic/UIEventSource"
|
||||
import { SpecialVisualization, SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import { SpecialVisualizationState, SpecialVisualizationSvelte } from "../SpecialVisualization"
|
||||
import { Feature } from "geojson"
|
||||
import BaseUIElement from "../BaseUIElement"
|
||||
import SvelteUIElement from "../Base/SvelteUIElement"
|
||||
import MapillaryLink from "../BigComponents/MapillaryLink.svelte"
|
||||
|
||||
export class MapillaryLinkVis implements SpecialVisualization {
|
||||
export class MapillaryLinkVis implements SpecialVisualizationSvelte {
|
||||
funcName = "mapillary_link"
|
||||
group = "web_and_communication"
|
||||
|
||||
docs = "Adds a button to open mapillary on the specified location"
|
||||
needsUrls = []
|
||||
|
||||
|
|
@ -24,7 +25,7 @@ export class MapillaryLinkVis implements SpecialVisualization {
|
|||
tagsSource: UIEventSource<Record<string, string>>,
|
||||
args: string[],
|
||||
feature: Feature
|
||||
): BaseUIElement {
|
||||
): SvelteUIElement {
|
||||
const [lon, lat] = GeoOperations.centerpointCoordinates(feature)
|
||||
let zoom = Number(args[0])
|
||||
if (isNaN(zoom)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue