Merge branch 'master' into develop

This commit is contained in:
pietervdvn 2021-11-16 15:50:32 +01:00
commit 3e7f1da8e7
3 changed files with 12 additions and 34 deletions

View file

@ -60,7 +60,7 @@ export default class RenderingMultiPlexerFeatureSource {
} }
if (feat.geometry.type === "LineString") { if (feat.geometry.type === "LineString") {
// Add start- and endpoints // Add start- and endpoints
const coordinates = feat.geometry.coordinates const coordinates = feat.geometry.coordinates
for (const rendering of startRenderings) { for (const rendering of startRenderings) {
@ -70,40 +70,16 @@ export default class RenderingMultiPlexerFeatureSource {
const coordinate = coordinates[coordinates.length - 1] const coordinate = coordinates[coordinates.length - 1]
addAsPoint(feat, rendering, coordinate) addAsPoint(feat, rendering, coordinate)
} }
} }
// AT last, add it 'as is' to what we should render
if (feat.geometry.type === "MultiLineString") { for (let i = 0; i < lineRenderObjects.length; i++) {
// Multilinestrings get a special treatment: we split them into their subparts before rendering withIndex.push({
const lineList: [number, number][][] = feat.geometry.coordinates ...feat,
lineRenderingIndex: i
for (let i1 = 0; i1 < lineList.length; i1++) { })
const coordinates = lineList[i1];
for (let i = 0; i < lineRenderObjects.length; i++) {
const orig = {
...feat,
lineRenderingIndex: i,
multiLineStringIndex: i1
}
orig.geometry.coordinates = coordinates
orig.geometry.type = "LineString"
withIndex.push(orig)
}
}
}else{
// AT last, add it 'as is' to what we should render
for (let i = 0; i < lineRenderObjects.length; i++) {
withIndex.push({
...feat,
lineRenderingIndex: i
})
}
} }
} }
} }

View file

@ -13,7 +13,8 @@
{ {
"id": "Privacy notice", "id": "Privacy notice",
"render": { "render": {
"en": "This is the path you've travelled since this website is opened. Don't worry - this is only visible to you and no one else. Your location data is never sent off-device." "en": "This is the path you've travelled since this website is opened. Don't worry - this is only visible to you and no one else. Your location data is never sent off-device.",
"nl": "Dit is waar je was sinds je deze website hebt geopened. Dit is enkel zichtbaar voor jou en niemand anders, je locatie wordt niet verstuurd"
} }
}, },
"export_as_gpx", "export_as_gpx",

View file

@ -309,7 +309,8 @@
"brand=Little Free Library", "brand=Little Free Library",
"nobrand=" "nobrand="
] ]
} },
"addExtraTags": ["brand:wikidata=Q6650101"]
}, },
{ {
"if": { "if": {