forked from MTSR/mapserver
dc5a401d8b
* Add For Sale Sings for Unified Money * Change popup and icon size * Revert icon size * Add For Sale Sign into searches * Fix syntax * Minor display change * Skip unconfigured for sale signs --------- Co-authored-by: 1F616EMO <root@1f616emo.xyz>
30 lines
966 B
JavaScript
30 lines
966 B
JavaScript
import AbstractIconOverlay from './AbstractIconOverlay.js';
|
|
import {HtmlSanitizer} from '../../lib/HtmlSanitizer.js';
|
|
|
|
export default AbstractIconOverlay.extend({
|
|
initialize: function () {
|
|
AbstractIconOverlay.prototype.initialize.call(this, "um_area_forsale");
|
|
},
|
|
|
|
getMaxDisplayedZoom: function () {
|
|
return 8;
|
|
},
|
|
|
|
getIcon: function () {
|
|
return L.icon({
|
|
iconUrl: "pics/um_area_forsale_sign_alpha.png",
|
|
iconSize: [32, 32],
|
|
iconAnchor: [16, 16],
|
|
popupAnchor: [0, -16]
|
|
});
|
|
},
|
|
|
|
createPopup: function (obj) {
|
|
return "<h4>Area For Sale</h4>" +
|
|
"<h5>" + HtmlSanitizer.SanitizeHtml(obj.attributes.description || "No Description") + "</h5><hr>" +
|
|
"<b>Owner:</b> " + HtmlSanitizer.SanitizeHtml(obj.attributes.owner) + "<br>" +
|
|
"<b>Area ID(s):</b> " + HtmlSanitizer.SanitizeHtml(obj.attributes.id) + "<br>" +
|
|
"<b>Price:</b> $" + HtmlSanitizer.SanitizeHtml(obj.attributes.price) + "<br>";
|
|
}
|
|
});
|