forked from MapComplete/MapComplete
Add icons, add validation, add phone and email types, add css fixes
This commit is contained in:
parent
eb4dda1ba2
commit
1372027dac
56 changed files with 2794 additions and 3474 deletions
|
@ -1,7 +1,6 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import {And, Or, Tag} from "../../Logic/TagsFilter";
|
||||
import {OperatorTag} from "../Questions/OperatorTag";
|
||||
import * as L from "leaflet";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import ParkingType from "../Questions/bike/ParkingType";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
|
@ -47,11 +46,11 @@ export default class BikeParkings extends LayerDefinition {
|
|||
return function (properties: any) {
|
||||
return {
|
||||
color: "#00bb00",
|
||||
icon: L.icon({
|
||||
icon: {
|
||||
iconUrl: self.icon,
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25,50]
|
||||
})
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import Translations from "../../UI/i18n/Translations";
|
|||
import {And, Tag} from "../../Logic/TagsFilter";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import { ImageCarouselWithUploadConstructor } from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import * as L from "leaflet";
|
||||
import ShopRetail from "../Questions/bike/ShopRetail";
|
||||
import ShopPump from "../Questions/bike/ShopPump";
|
||||
import ShopRental from "../Questions/bike/ShopRental";
|
||||
|
@ -71,11 +70,11 @@ export default class BikeShops extends LayerDefinition {
|
|||
|
||||
return {
|
||||
color: "#00bb00",
|
||||
icon: L.icon({
|
||||
icon: {
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25, 50]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import {And, Tag, TagsFilter, Or} from "../../Logic/TagsFilter";
|
||||
import * as L from "leaflet";
|
||||
import BikeStationChain from "../Questions/bike/StationChain";
|
||||
import BikeStationPumpTools from "../Questions/bike/StationPumpTools";
|
||||
import BikeStationStand from "../Questions/bike/StationStand";
|
||||
|
@ -72,18 +71,18 @@ export default class BikeStations extends LayerDefinition {
|
|||
if (isOperational) {
|
||||
iconName = "pump.svg"
|
||||
} else {
|
||||
iconName = "broken_pump.svg"
|
||||
iconName = "broken_pump_2.svg"
|
||||
}
|
||||
}
|
||||
|
||||
const iconUrl = `./assets/bike/${iconName}`
|
||||
return {
|
||||
color: "#00bb00",
|
||||
icon: L.icon({
|
||||
icon: {
|
||||
iconUrl: iconUrl,
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25, 50]
|
||||
})
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import {And, Or, Tag} from "../../Logic/TagsFilter";
|
|||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import L from "leaflet";
|
||||
|
||||
export class Birdhide extends LayerDefinition {
|
||||
|
||||
|
@ -13,8 +12,9 @@ export class Birdhide extends LayerDefinition {
|
|||
constructor() {
|
||||
super({
|
||||
name: "vogelkijkplaats",
|
||||
description: "Een plaats om vogels te kijken, zoals een vogelkijkhut of kijkwand",
|
||||
overpassFilter: Birdhide.birdhide,
|
||||
elementsToShow: [new FixedText("hi")],
|
||||
elementsToShow: [],
|
||||
icon: "assets/nature/birdhide.svg",
|
||||
minzoom: 12,
|
||||
wayHandling: LayerDefinition.WAYHANDLING_CENTER_AND_WAY,
|
||||
|
@ -90,11 +90,11 @@ export class Birdhide extends LayerDefinition {
|
|||
|
||||
return {
|
||||
color: "#0000bb",
|
||||
icon: L.icon({
|
||||
icon: {
|
||||
iconUrl: icon,
|
||||
iconSize: [40,40],
|
||||
iconAnchor: [20,20]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import L from "leaflet";
|
||||
import {And, Or, Tag} from "../../Logic/TagsFilter";
|
||||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import {NameInline} from "../Questions/NameInline";
|
||||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import Translations from "../../UI/i18n/Translations";
|
||||
|
||||
export class Bookcases extends LayerDefinition {
|
||||
|
||||
|
@ -16,7 +16,7 @@ export class Bookcases extends LayerDefinition {
|
|||
this.overpassFilter = new Tag("amenity", "public_bookcase");
|
||||
this.minzoom = 11;
|
||||
|
||||
this.title = new NameInline("ruilboekenkastje");
|
||||
this.title = new NameInline(Translations.t.bookcases.bookcase);
|
||||
this.elementsToShow = [
|
||||
new ImageCarouselWithUploadConstructor(),
|
||||
new TagRenderingOptions({
|
||||
|
@ -38,7 +38,7 @@ export class Bookcases extends LayerDefinition {
|
|||
question: "Hoeveel boeken passen in dit boekenruilkastje?",
|
||||
freeform: {
|
||||
renderTemplate: "Er passen {capacity} boeken in dit boekenruilkastje",
|
||||
template: "Er passen $$$ boeken in dit boekenruilkastje",
|
||||
template: "Er passen $nat$ boeken in dit boekenruilkastje",
|
||||
key: "capacity",
|
||||
placeholder: "aantal"
|
||||
},
|
||||
|
@ -159,10 +159,11 @@ export class Bookcases extends LayerDefinition {
|
|||
|
||||
this.style = function (tags) {
|
||||
return {
|
||||
icon: new L.icon({
|
||||
icon: {
|
||||
iconUrl: "assets/bookcase.svg",
|
||||
iconSize: [40, 40]
|
||||
}),
|
||||
iconSize: [40, 40],
|
||||
iconAnchor: [20,20]
|
||||
},
|
||||
color: "#0000ff"
|
||||
};
|
||||
}
|
||||
|
|
|
@ -52,11 +52,11 @@ export class DrinkingWater extends LayerDefinition {
|
|||
|
||||
return {
|
||||
color: "#00bb00",
|
||||
icon: new L.icon({
|
||||
icon: {
|
||||
iconUrl: self.icon,
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25,50]
|
||||
})
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import L from "leaflet"
|
||||
import {And, Regex, Tag} from "../../Logic/TagsFilter";
|
||||
import {TagRenderingOptions} from "../TagRendering";
|
||||
|
||||
|
@ -18,11 +17,10 @@ export class GrbToFix extends LayerDefinition {
|
|||
|
||||
this.style = function (tags) {
|
||||
return {
|
||||
icon: new L.icon({
|
||||
icon: {
|
||||
iconUrl: "assets/star.svg",
|
||||
iconSize: [40, 40],
|
||||
text: "hi"
|
||||
}),
|
||||
},
|
||||
color: "#ff0000"
|
||||
};
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ import FixedText from "../Questions/FixedText";
|
|||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import {And, Tag} from "../../Logic/TagsFilter";
|
||||
import L from "leaflet";
|
||||
|
||||
export class InformationBoard extends LayerDefinition {
|
||||
constructor() {
|
||||
super({
|
||||
name: "Informatiebord",
|
||||
description: "Een informatiebord of kaart",
|
||||
minzoom: 12,
|
||||
overpassFilter: new Tag("tourism", "information"),
|
||||
newElementTags: [new Tag("tourism", "information")],
|
||||
|
@ -44,12 +44,10 @@ export class InformationBoard extends LayerDefinition {
|
|||
|
||||
return {
|
||||
color: "#000000",
|
||||
icon: L.icon(
|
||||
{
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50]
|
||||
}
|
||||
)
|
||||
icon: {
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import FixedText from "../Questions/FixedText";
|
|||
import {ImageCarouselWithUploadConstructor} from "../../UI/Image/ImageCarouselWithUpload";
|
||||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import {And, Tag} from "../../Logic/TagsFilter";
|
||||
import L from "leaflet";
|
||||
|
||||
export class Map extends LayerDefinition {
|
||||
constructor() {
|
||||
|
@ -36,12 +35,10 @@ export class Map extends LayerDefinition {
|
|||
|
||||
return {
|
||||
color: "#000000",
|
||||
icon: L.icon(
|
||||
{
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50]
|
||||
}
|
||||
)
|
||||
icon: {
|
||||
iconUrl: icon,
|
||||
iconSize: [50, 50]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ export class NatureReserves extends LayerDefinition {
|
|||
freeform: {
|
||||
renderTemplate: "Bij problemen of vragen, de conservator kan bereikt worden via " +
|
||||
"<a href='mailto:{email}'>{email}</a>",
|
||||
template: "$$$",
|
||||
template: "$email$",
|
||||
key: "email"
|
||||
}
|
||||
}),
|
||||
|
@ -83,7 +83,7 @@ export class NatureReserves extends LayerDefinition {
|
|||
freeform: {
|
||||
renderTemplate: "Bij problemen of vragen, de {conservator} kan bereikt worden via " +
|
||||
"<a href='tel:{phone}'>{phone}</a>",
|
||||
template: "$$$",
|
||||
template: "$phone$",
|
||||
key: "phone"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import L from "leaflet"
|
||||
import {FixedUiElement} from "../../UI/Base/FixedUiElement";
|
||||
import FixedText from "../Questions/FixedText";
|
||||
import {Tag} from "../../Logic/TagsFilter";
|
||||
|
@ -17,10 +16,10 @@ export class Viewpoint extends LayerDefinition {
|
|||
wayHandling: LayerDefinition.WAYHANDLING_CENTER_ONLY,
|
||||
style: tags => {
|
||||
return {
|
||||
color: undefined, icon: new L.icon({
|
||||
color: undefined, icon:{
|
||||
iconUrl: "assets/viewpoint.svg",
|
||||
iconSize: [20, 20]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
maxAllowedOverlapPercentage: 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue