const tags = feature.tags;
let prefix = "";
- if (tags.boundary === "administrative" && tags.admin_level) {
- prefix = I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level, {
- defaultValue: I18n.t("geocoder.search_osm_nominatim.prefix.boundary.administrative")
+ if (tags.boundary === "administrative" && (tags.border_type || tags.admin_level)) {
+ prefix = I18n.t("geocoder.search_osm_nominatim.border_types." + tags.border_type, {
+ defaultValue: I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level, {
+ defaultValue: I18n.t("geocoder.search_osm_nominatim.prefix.boundary.administrative")
+ })
});
} else {
const prefixes = I18n.t("geocoder.search_osm_nominatim.prefix");
const params = new URLSearchParams(path.substring(path.indexOf("?"))),
latlng = L.latLng(params.get("lat"), params.get("lon"));
- if (!window.location.hash && !noCentre && !map.getBounds().contains(latlng)) {
+ if (!location.hash && !noCentre && !map.getBounds().contains(latlng)) {
OSM.router.withoutMoveListener(function () {
map.setView(latlng, 15);
});