Skip to content

Commit

Permalink
Add address for POIs (#404)
Browse files Browse the repository at this point in the history
* Add address for POIs

* Add missing semicolon
  • Loading branch information
Emojigit authored Aug 10, 2024
1 parent 02bb99f commit f266593
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions mapobject/poi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 5 additions & 1 deletion public/js/map/overlays/PoiOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f266593

Please sign in to comment.