const hash = location.hash.substring(1);
const hashParams = hash ? OSM.params(hash) : {};
- const hashArgs = OSM.parseHash(location.hash);
+ const hashArgs = OSM.parseHash();
const mapParams = OSM.mapParams();
const params = new URLSearchParams();
let zoom, lat, lon;
};
function addObject(type, id, version, center) {
- const hashParams = OSM.parseHash(location.hash);
+ const hashParams = OSM.parseHash();
map.addObject({ type: type, id: parseInt(id, 10), version: version && parseInt(version, 10) }, function (bounds) {
if (!hashParams.center && bounds.isValid() &&
(center || !map.getBounds().contains(bounds))) {
const changesetData = content.find("[data-changeset]").data("changeset");
changesetData.type = "changeset";
- const hashParams = OSM.parseHash(location.hash);
+ const hashParams = OSM.parseHash();
initialize();
map.addObject(changesetData, function (bounds) {
if (!hashParams.center && bounds.isValid()) {
const data = $(".details").data();
if (data) {
- const hashParams = OSM.parseHash(location.hash);
+ const hashParams = OSM.parseHash();
map.addObject({
type: "note",
id: parseInt(id, 10),
}
}
- const hash = OSM.parseHash(location.hash);
+ const hash = OSM.parseHash();
const loc = Cookies.get("_osm_location")?.split("|");
return mapParams;
},
- parseHash: function (hash) {
+ parseHash: function (hash = location.hash) {
const args = {};
const i = hash.indexOf("#");