Add address for POIs (#404)

* Add address for POIs

* Add missing semicolon
This commit is contained in:
1F616EMO~nya 2024-08-10 15:19:24 +08:00 committed by GitHub
parent 02bb99f739
commit f266593f9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,7 @@ func (this *PoiBlock) onMapObject(mbpos *types.MapBlockCoords, x, y, z int, bloc
o := mapobjectdb.NewMapObject(mbpos, x, y, z, "poi")
o.Attributes["name"] = md["name"]
o.Attributes["category"] = md["category"]
o.Attributes["addr"] = md["addr"]
o.Attributes["url"] = md["url"]
o.Attributes["image"] = md["image"]
o.Attributes["owner"] = md["owner"]

View File

@ -35,7 +35,11 @@ export default AbstractIconOverlay.extend({
"\" crossorigin=\"anonymous\" referrerpolicy=\"origin-when-cross-origin\"></div>";
}
innerHTML += "<hr><b>Owner: </b> " + HtmlSanitizer.SanitizeHtml(poi.attributes.owner) + "<br>";
innerHTML += "<hr>";
if (poi.attributes.addr) {
innerHTML += "<b>Address: </b> " + HtmlSanitizer.SanitizeHtml(poi.attributes.addr) + "<br>";
}
innerHTML += "<b>Owner: </b> " + HtmlSanitizer.SanitizeHtml(poi.attributes.owner) + "<br>";
return innerHTML;
}