Completed the port of the buurtnatuur-layer with some fixes for that
This commit is contained in:
parent
8963db4621
commit
77e065d6e7
8 changed files with 29 additions and 9 deletions
|
@ -408,15 +408,21 @@ export class InitUiElements {
|
|||
static InitBaseMap(){
|
||||
const bm = new Basemap("leafletDiv", State.state.locationControl, new VariableUiElement(
|
||||
State.state.locationControl.map((location) => {
|
||||
const mapComplete = `<a href='https://github.com/pietervdvn/MapComplete' target='_blank'>Mapcomplete ${State.vNumber}</a> <a href='https://github.com/pietervdvn/MapComplete/issues' target='_blank'><img src='./assets/bug.svg' alt='Report bug' class='small-userbadge-icon'></a>`;
|
||||
const mapComplete = `<a href='https://github.com/pietervdvn/MapComplete' target='_blank'>Mapcomplete ${State.vNumber}</a>`
|
||||
const reportBug = `<a href='https://github.com/pietervdvn/MapComplete/issues' target='_blank'><img src='./assets/bug.svg' class='small-userbadge-icon'></a>`;
|
||||
|
||||
const layoutId = State.state.layoutToUse.data.id;
|
||||
const osmChaLink = `https://osmcha.org/?filters=%7B%22comment%22%3A%5B%7B%22label%22%3A%22%23${layoutId}%22%2C%22value%22%3A%22%23${layoutId}%22%7D%5D%2C%22date__gte%22%3A%5B%7B%22label%22%3A%222020-07-05%22%2C%22value%22%3A%222020-07-05%22%7D%5D%2C%22editor%22%3A%5B%7B%22label%22%3A%22MapComplete%22%2C%22value%22%3A%22MapComplete%22%7D%5D%7D`
|
||||
console.log("OsmCha link is",osmChaLink);
|
||||
const stats = `<a href='${osmChaLink}' target='_blank'><img src='./assets/statistics.svg' class='small-userbadge-icon'></a>`;
|
||||
let editHere = "";
|
||||
if (location !== undefined) {
|
||||
editHere = " | " +
|
||||
editHere =
|
||||
"<a href='https://www.openstreetmap.org/edit?editor=id#map=" + location.zoom + "/" + location.lat + "/" + location.lon + "' target='_blank'>" +
|
||||
"<img src='./assets/pencil.svg' alt='edit here' class='small-userbadge-icon'>" +
|
||||
"</a>"
|
||||
}
|
||||
return mapComplete + editHere;
|
||||
return new Combine([mapComplete, reportBug, " | ", stats, " | ",editHere]).Render();
|
||||
|
||||
})
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue