@maptiler/geocoding-control 2.1.7 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CODE_OF_CONDUCT.md +46 -0
- package/CONTRIBUTING.md +72 -0
- package/README.md +115 -43
- package/SECURITY.md +16 -0
- package/dist/index.js +860 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +263 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/leaflet.public.js +1251 -0
- package/dist/leaflet.public.js.map +1 -0
- package/dist/leaflet.public.umd.js +276 -0
- package/dist/leaflet.public.umd.js.map +1 -0
- package/dist/maplibregl.js +1275 -0
- package/dist/maplibregl.js.map +1 -0
- package/dist/maplibregl.umd.js +276 -0
- package/dist/maplibregl.umd.js.map +1 -0
- package/dist/maptilersdk.js +1283 -0
- package/dist/maptilersdk.js.map +1 -0
- package/dist/maptilersdk.umd.js +276 -0
- package/dist/maptilersdk.umd.js.map +1 -0
- package/dist/src/components/clear-icon.d.ts +10 -0
- package/dist/src/components/fail-icon.d.ts +10 -0
- package/dist/src/components/loading-icon.d.ts +10 -0
- package/dist/src/components/marker.d.ts +10 -0
- package/dist/src/components/reverse-geocoding-icon.d.ts +10 -0
- package/dist/src/components/search-icon.d.ts +10 -0
- package/dist/src/controls/base-control.d.ts +44 -0
- package/dist/src/controls/leaflet-control.d.ts +27 -0
- package/dist/src/controls/leaflet-events.d.ts +42 -0
- package/dist/src/controls/leaflet-options.d.ts +84 -0
- package/dist/src/controls/maplibregl-control.d.ts +34 -0
- package/dist/src/controls/maplibregl-events.d.ts +44 -0
- package/dist/src/controls/maplibregl-options.d.ts +104 -0
- package/dist/src/controls/maptilersdk-control.d.ts +7 -0
- package/dist/src/controls/maptilersdk-events.d.ts +2 -0
- package/dist/src/controls/maptilersdk-options.d.ts +10 -0
- package/dist/src/controls/openlayers-control.d.ts +35 -0
- package/dist/src/controls/openlayers-events.d.ts +43 -0
- package/dist/src/controls/openlayers-options.d.ts +83 -0
- package/dist/src/geocoder/geocoder-events.d.ts +46 -0
- package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
- package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +23 -143
- package/dist/src/geocoder/geocoder.d.ts +113 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/leaflet.public.d.ts +7 -0
- package/dist/src/maplibregl.d.ts +7 -0
- package/dist/src/maptilersdk.d.ts +7 -0
- package/dist/src/openlayers.public.d.ts +7 -0
- package/dist/src/types.d.ts +46 -0
- package/dist/src/utils/geo-utils.d.ts +6 -0
- package/dist/src/utils/mask.d.ts +2 -0
- package/dist/src/utils/proximity.d.ts +2 -0
- package/package.json +84 -112
- package/MapLibreBasedGeocodingControl.d.ts +0 -3072
- package/geo-coordinates-parser.t.d.ts +0 -8
- package/geoUtils.d.ts +0 -3
- package/leaflet-controller.d.ts +0 -12
- package/leaflet-controller.js +0 -2475
- package/leaflet-controller.js.map +0 -1
- package/leaflet-controller.umd.js +0 -2
- package/leaflet-controller.umd.js.map +0 -1
- package/leaflet.d.ts +0 -131
- package/leaflet.js +0 -5082
- package/leaflet.js.map +0 -1
- package/leaflet.umd.js +0 -14
- package/leaflet.umd.js.map +0 -1
- package/maplibregl-controller.d.ts +0 -19
- package/maplibregl-controller.js +0 -2418
- package/maplibregl-controller.js.map +0 -1
- package/maplibregl-controller.umd.js +0 -2
- package/maplibregl-controller.umd.js.map +0 -1
- package/maplibregl.d.ts +0 -2509
- package/maplibregl.js +0 -5142
- package/maplibregl.js.map +0 -1
- package/maplibregl.umd.js +0 -14
- package/maplibregl.umd.js.map +0 -1
- package/maptilersdk.d.ts +0 -2504
- package/maptilersdk.js +0 -5152
- package/maptilersdk.js.map +0 -1
- package/maptilersdk.umd.js +0 -14
- package/maptilersdk.umd.js.map +0 -1
- package/mask.d.ts +0 -2
- package/openlayers-controller.d.ts +0 -15
- package/openlayers-controller.js +0 -2174
- package/openlayers-controller.js.map +0 -1
- package/openlayers-controller.umd.js +0 -2
- package/openlayers-controller.umd.js.map +0 -1
- package/openlayers.d.ts +0 -109
- package/openlayers.js +0 -5045
- package/openlayers.js.map +0 -1
- package/openlayers.umd.js +0 -14
- package/openlayers.umd.js.map +0 -1
- package/proximity.d.ts +0 -2
- package/react.d.ts +0 -45
- package/react.js +0 -2795
- package/react.js.map +0 -1
- package/react.umd.js +0 -14
- package/react.umd.js.map +0 -1
- package/style.css +0 -1
- package/svelte/ClearIcon.svelte +0 -12
- package/svelte/ClearIcon.svelte.d.ts +0 -25
- package/svelte/FailIcon.svelte +0 -12
- package/svelte/FailIcon.svelte.d.ts +0 -25
- package/svelte/FeatureItem.svelte +0 -246
- package/svelte/FeatureItem.svelte.d.ts +0 -26
- package/svelte/GeocodingControl.svelte +0 -921
- package/svelte/GeocodingControl.svelte.d.ts +0 -105
- package/svelte/LoadingIcon.svelte +0 -40
- package/svelte/LoadingIcon.svelte.d.ts +0 -25
- package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
- package/svelte/MapLibreBasedGeocodingControl.js +0 -210
- package/svelte/MarkerIcon.svelte +0 -71
- package/svelte/MarkerIcon.svelte.d.ts +0 -18
- package/svelte/ReverseGeocodingIcon.svelte +0 -12
- package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
- package/svelte/SearchIcon.svelte +0 -26
- package/svelte/SearchIcon.svelte.d.ts +0 -25
- package/svelte/geo-coordinates-parser.t.d.ts +0 -8
- package/svelte/geo-coordinates-parser.t.js +0 -1
- package/svelte/geoUtils.d.ts +0 -3
- package/svelte/geoUtils.js +0 -18
- package/svelte/info.json +0 -1
- package/svelte/leaflet-controller.d.ts +0 -12
- package/svelte/leaflet-controller.js +0 -274
- package/svelte/leaflet.d.ts +0 -131
- package/svelte/leaflet.js +0 -116
- package/svelte/maplibregl-controller.d.ts +0 -19
- package/svelte/maplibregl-controller.js +0 -279
- package/svelte/maplibregl.d.ts +0 -2509
- package/svelte/maplibregl.js +0 -17
- package/svelte/maptilersdk.d.ts +0 -2504
- package/svelte/maptilersdk.js +0 -32
- package/svelte/mask.d.ts +0 -2
- package/svelte/mask.js +0 -54
- package/svelte/openlayers-controller.d.ts +0 -15
- package/svelte/openlayers-controller.js +0 -283
- package/svelte/openlayers.d.ts +0 -109
- package/svelte/openlayers.js +0 -178
- package/svelte/proximity.d.ts +0 -2
- package/svelte/proximity.js +0 -60
- package/svelte/react.d.ts +0 -45
- package/svelte/react.js +0 -106
- package/svelte/types.js +0 -1
- package/svelte/vanilla.d.ts +0 -61
- package/svelte/vanilla.js +0 -101
- package/svelte/vite-env.d.ts +0 -2
- package/types.d.ts +0 -391
- package/vanilla.d.ts +0 -61
- package/vanilla.js +0 -2799
- package/vanilla.js.map +0 -1
- package/vanilla.umd.js +0 -14
- package/vanilla.umd.js.map +0 -1
- /package/{icons → dist/icons}/10pin.svg +0 -0
- /package/{icons → dist/icons}/9pin.svg +0 -0
- /package/{icons → dist/icons}/advertising_column.svg +0 -0
- /package/{icons → dist/icons}/aerodrome.svg +0 -0
- /package/{icons → dist/icons}/alcohol.svg +0 -0
- /package/{icons → dist/icons}/alpine_hut.svg +0 -0
- /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
- /package/{icons → dist/icons}/amusement_park.svg +0 -0
- /package/{icons → dist/icons}/apartment.svg +0 -0
- /package/{icons → dist/icons}/archaeological_site.svg +0 -0
- /package/{icons → dist/icons}/area.svg +0 -0
- /package/{icons → dist/icons}/art.svg +0 -0
- /package/{icons → dist/icons}/arts_centre.svg +0 -0
- /package/{icons → dist/icons}/artwork.svg +0 -0
- /package/{icons → dist/icons}/audioguide.svg +0 -0
- /package/{icons → dist/icons}/bag.svg +0 -0
- /package/{icons → dist/icons}/beauty.svg +0 -0
- /package/{icons → dist/icons}/bed.svg +0 -0
- /package/{icons → dist/icons}/bell_tower.svg +0 -0
- /package/{icons → dist/icons}/beverages.svg +0 -0
- /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
- /package/{icons → dist/icons}/biergarten.svg +0 -0
- /package/{icons → dist/icons}/bird_hide.svg +0 -0
- /package/{icons → dist/icons}/boat_rental.svg +0 -0
- /package/{icons → dist/icons}/bookmaker.svg +0 -0
- /package/{icons → dist/icons}/books.svg +0 -0
- /package/{icons → dist/icons}/bowl.svg +0 -0
- /package/{icons → dist/icons}/bowling_alley.svg +0 -0
- /package/{icons → dist/icons}/bunker.svg +0 -0
- /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
- /package/{icons → dist/icons}/bus_station.svg +0 -0
- /package/{icons → dist/icons}/bust.svg +0 -0
- /package/{icons → dist/icons}/camping.svg +0 -0
- /package/{icons → dist/icons}/car_parts.svg +0 -0
- /package/{icons → dist/icons}/car_wash.svg +0 -0
- /package/{icons → dist/icons}/caravan_park.svg +0 -0
- /package/{icons → dist/icons}/carpet.svg +0 -0
- /package/{icons → dist/icons}/cattle_grid.svg +0 -0
- /package/{icons → dist/icons}/cave_entrance.svg +0 -0
- /package/{icons → dist/icons}/chalet.svg +0 -0
- /package/{icons → dist/icons}/charity.svg +0 -0
- /package/{icons → dist/icons}/chemist.svg +0 -0
- /package/{icons → dist/icons}/chimney.svg +0 -0
- /package/{icons → dist/icons}/church.svg +0 -0
- /package/{icons → dist/icons}/city_gate.svg +0 -0
- /package/{icons → dist/icons}/clinic.svg +0 -0
- /package/{icons → dist/icons}/clothes.svg +0 -0
- /package/{icons → dist/icons}/coffee.svg +0 -0
- /package/{icons → dist/icons}/community_centre.svg +0 -0
- /package/{icons → dist/icons}/computer.svg +0 -0
- /package/{icons → dist/icons}/consulate.svg +0 -0
- /package/{icons → dist/icons}/copyshop.svg +0 -0
- /package/{icons → dist/icons}/cosmetics.svg +0 -0
- /package/{icons → dist/icons}/courthouse.svg +0 -0
- /package/{icons → dist/icons}/crane.svg +0 -0
- /package/{icons → dist/icons}/dairy.svg +0 -0
- /package/{icons → dist/icons}/deli.svg +0 -0
- /package/{icons → dist/icons}/department_store.svg +0 -0
- /package/{icons → dist/icons}/diy.svg +0 -0
- /package/{icons → dist/icons}/electronics.svg +0 -0
- /package/{icons → dist/icons}/embankment.svg +0 -0
- /package/{icons → dist/icons}/embassy.svg +0 -0
- /package/{icons → dist/icons}/excrement_bags.svg +0 -0
- /package/{icons → dist/icons}/fabric.svg +0 -0
- /package/{icons → dist/icons}/farmyard.svg +0 -0
- /package/{icons → dist/icons}/ferry.svg +0 -0
- /package/{icons → dist/icons}/firepit.svg +0 -0
- /package/{icons → dist/icons}/firestation.svg +0 -0
- /package/{icons → dist/icons}/fishing.svg +0 -0
- /package/{icons → dist/icons}/fitness.svg +0 -0
- /package/{icons → dist/icons}/ford.svg +0 -0
- /package/{icons → dist/icons}/fort.svg +0 -0
- /package/{icons → dist/icons}/fortress.svg +0 -0
- /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
- /package/{icons → dist/icons}/generator_wind.svg +0 -0
- /package/{icons → dist/icons}/golf_pin.svg +0 -0
- /package/{icons → dist/icons}/greengrocer.svg +0 -0
- /package/{icons → dist/icons}/guest_house.svg +0 -0
- /package/{icons → dist/icons}/helipad.svg +0 -0
- /package/{icons → dist/icons}/hifi.svg +0 -0
- /package/{icons → dist/icons}/hostel.svg +0 -0
- /package/{icons → dist/icons}/hotel.svg +0 -0
- /package/{icons → dist/icons}/housenumber.svg +0 -0
- /package/{icons → dist/icons}/houseware.svg +0 -0
- /package/{icons → dist/icons}/hunting_stand.svg +0 -0
- /package/{icons → dist/icons}/interior_decoration.svg +0 -0
- /package/{icons → dist/icons}/internet_cafe.svg +0 -0
- /package/{icons → dist/icons}/kindergarten.svg +0 -0
- /package/{icons → dist/icons}/kissing_gate.svg +0 -0
- /package/{icons → dist/icons}/manor.svg +0 -0
- /package/{icons → dist/icons}/map.svg +0 -0
- /package/{icons → dist/icons}/marker_reverse.svg +0 -0
- /package/{icons → dist/icons}/marker_selected.svg +0 -0
- /package/{icons → dist/icons}/marker_unselected.svg +0 -0
- /package/{icons → dist/icons}/marketplace.svg +0 -0
- /package/{icons → dist/icons}/massage.svg +0 -0
- /package/{icons → dist/icons}/mast.svg +0 -0
- /package/{icons → dist/icons}/mast_communications.svg +0 -0
- /package/{icons → dist/icons}/mast_lighting.svg +0 -0
- /package/{icons → dist/icons}/medical_supply.svg +0 -0
- /package/{icons → dist/icons}/memorial.svg +0 -0
- /package/{icons → dist/icons}/miniature_golf.svg +0 -0
- /package/{icons → dist/icons}/motel.svg +0 -0
- /package/{icons → dist/icons}/mountain_range.svg +0 -0
- /package/{icons → dist/icons}/multifaith.svg +0 -0
- /package/{icons → dist/icons}/musical_instrument.svg +0 -0
- /package/{icons → dist/icons}/newsagent.svg +0 -0
- /package/{icons → dist/icons}/nightclub.svg +0 -0
- /package/{icons → dist/icons}/ocean.svg +0 -0
- /package/{icons → dist/icons}/office.svg +0 -0
- /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
- /package/{icons → dist/icons}/palace.svg +0 -0
- /package/{icons → dist/icons}/parcel_locker.svg +0 -0
- /package/{icons → dist/icons}/parking_space.svg +0 -0
- /package/{icons → dist/icons}/parking_tickets.svg +0 -0
- /package/{icons → dist/icons}/pet.svg +0 -0
- /package/{icons → dist/icons}/photo.svg +0 -0
- /package/{icons → dist/icons}/picnic.svg +0 -0
- /package/{icons → dist/icons}/plaque.svg +0 -0
- /package/{icons → dist/icons}/poi.svg +0 -0
- /package/{icons → dist/icons}/post_box.svg +0 -0
- /package/{icons → dist/icons}/post_office.svg +0 -0
- /package/{icons → dist/icons}/postal_code.svg +0 -0
- /package/{icons → dist/icons}/pub.svg +0 -0
- /package/{icons → dist/icons}/public_bath.svg +0 -0
- /package/{icons → dist/icons}/public_bookcase.svg +0 -0
- /package/{icons → dist/icons}/public_building.svg +0 -0
- /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
- /package/{icons → dist/icons}/reverse.svg +0 -0
- /package/{icons → dist/icons}/river.svg +0 -0
- /package/{icons → dist/icons}/road.svg +0 -0
- /package/{icons → dist/icons}/saddle.svg +0 -0
- /package/{icons → dist/icons}/sauna.svg +0 -0
- /package/{icons → dist/icons}/sea.svg +0 -0
- /package/{icons → dist/icons}/second_hand.svg +0 -0
- /package/{icons → dist/icons}/shintoist.svg +0 -0
- /package/{icons → dist/icons}/shoe.svg +0 -0
- /package/{icons → dist/icons}/shower.svg +0 -0
- /package/{icons → dist/icons}/shrine.svg +0 -0
- /package/{icons → dist/icons}/sikhist.svg +0 -0
- /package/{icons → dist/icons}/slipway.svg +0 -0
- /package/{icons → dist/icons}/snowmobile.svg +0 -0
- /package/{icons → dist/icons}/social_facility.svg +0 -0
- /package/{icons → dist/icons}/sports.svg +0 -0
- /package/{icons → dist/icons}/sprite.json +0 -0
- /package/{icons → dist/icons}/sprite.png +0 -0
- /package/{icons → dist/icons}/sprite@2x.json +0 -0
- /package/{icons → dist/icons}/sprite@2x.png +0 -0
- /package/{icons → dist/icons}/stationery.svg +0 -0
- /package/{icons → dist/icons}/stile.svg +0 -0
- /package/{icons → dist/icons}/stone.svg +0 -0
- /package/{icons → dist/icons}/storage_tank.svg +0 -0
- /package/{icons → dist/icons}/stream.svg +0 -0
- /package/{icons → dist/icons}/street.svg +0 -0
- /package/{icons → dist/icons}/supermarket.svg +0 -0
- /package/{icons → dist/icons}/tea.svg +0 -0
- /package/{icons → dist/icons}/telescope_dish.svg +0 -0
- /package/{icons → dist/icons}/telescope_dome.svg +0 -0
- /package/{icons → dist/icons}/ticket.svg +0 -0
- /package/{icons → dist/icons}/tobacco.svg +0 -0
- /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
- /package/{icons → dist/icons}/tower_cooling.svg +0 -0
- /package/{icons → dist/icons}/tower_dish.svg +0 -0
- /package/{icons → dist/icons}/tower_dome.svg +0 -0
- /package/{icons → dist/icons}/tower_generic.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
- /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
- /package/{icons → dist/icons}/tower_lighting.svg +0 -0
- /package/{icons → dist/icons}/townhall.svg +0 -0
- /package/{icons → dist/icons}/toys.svg +0 -0
- /package/{icons → dist/icons}/trade.svg +0 -0
- /package/{icons → dist/icons}/traffic_light.svg +0 -0
- /package/{icons → dist/icons}/train_station.svg +0 -0
- /package/{icons → dist/icons}/travel_agency.svg +0 -0
- /package/{icons → dist/icons}/tyres.svg +0 -0
- /package/{icons → dist/icons}/university.svg +0 -0
- /package/{icons → dist/icons}/variety_store.svg +0 -0
- /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
- /package/{icons → dist/icons}/vending_machine.svg +0 -0
- /package/{icons → dist/icons}/video.svg +0 -0
- /package/{icons → dist/icons}/video_games.svg +0 -0
- /package/{icons → dist/icons}/waste_disposal.svg +0 -0
- /package/{icons → dist/icons}/water_well.svg +0 -0
- /package/{icons → dist/icons}/waterfall.svg +0 -0
- /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
import { css as I, LitElement as L, svg as q, html as f, unsafeCSS as fe, nothing as Q } from "lit";
|
|
2
|
+
import { customElement as F, property as h, state as b, query as Ue } from "lit/decorators.js";
|
|
3
|
+
import { convert as Me } from "geo-coordinates-parser";
|
|
4
|
+
import { classMap as j } from "lit/directives/class-map.js";
|
|
5
|
+
import { repeat as Pe } from "lit/directives/repeat.js";
|
|
6
|
+
import "@turf/clone";
|
|
7
|
+
import { styleMap as Be } from "lit/directives/style-map.js";
|
|
8
|
+
var Ee = Object.getOwnPropertyDescriptor, Ge = (e, t, i, n) => {
|
|
9
|
+
for (var s = n > 1 ? void 0 : n ? Ee(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
10
|
+
(p = e[r]) && (s = p(s) || s);
|
|
11
|
+
return s;
|
|
12
|
+
};
|
|
13
|
+
let H = class extends L {
|
|
14
|
+
render() {
|
|
15
|
+
return q`
|
|
16
|
+
<svg viewBox="0 0 14 14" width="13" height="13">
|
|
17
|
+
<path
|
|
18
|
+
d="M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
H.styles = I`
|
|
25
|
+
svg {
|
|
26
|
+
display: block;
|
|
27
|
+
fill: var(--color-icon-button);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
H = Ge([
|
|
31
|
+
F("maptiler-geocode-clear-icon")
|
|
32
|
+
], H);
|
|
33
|
+
var De = Object.getOwnPropertyDescriptor, je = (e, t, i, n) => {
|
|
34
|
+
for (var s = n > 1 ? void 0 : n ? De(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
35
|
+
(p = e[r]) && (s = p(s) || s);
|
|
36
|
+
return s;
|
|
37
|
+
};
|
|
38
|
+
let J = class extends L {
|
|
39
|
+
render() {
|
|
40
|
+
return q`
|
|
41
|
+
<svg viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
42
|
+
<path
|
|
43
|
+
d="M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
J.styles = I`
|
|
50
|
+
svg {
|
|
51
|
+
display: block;
|
|
52
|
+
fill: #e15042;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
J = je([
|
|
56
|
+
F("maptiler-geocode-fail-icon")
|
|
57
|
+
], J);
|
|
58
|
+
var Ae = Object.getOwnPropertyDescriptor, Re = (e, t, i, n) => {
|
|
59
|
+
for (var s = n > 1 ? void 0 : n ? Ae(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
60
|
+
(p = e[r]) && (s = p(s) || s);
|
|
61
|
+
return s;
|
|
62
|
+
};
|
|
63
|
+
let X = class extends L {
|
|
64
|
+
render() {
|
|
65
|
+
return f`
|
|
66
|
+
<div>
|
|
67
|
+
<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon">
|
|
68
|
+
<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z" />
|
|
69
|
+
<path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z" />
|
|
70
|
+
</svg>
|
|
71
|
+
</div>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
X.styles = I`
|
|
76
|
+
div {
|
|
77
|
+
position: absolute;
|
|
78
|
+
left: 50%;
|
|
79
|
+
top: 50%;
|
|
80
|
+
transform: translate(-50%, -50%);
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.loading-icon {
|
|
88
|
+
animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@keyframes rotate {
|
|
92
|
+
from {
|
|
93
|
+
-webkit-transform: rotate(0);
|
|
94
|
+
transform: rotate(0);
|
|
95
|
+
}
|
|
96
|
+
to {
|
|
97
|
+
-webkit-transform: rotate(360deg);
|
|
98
|
+
transform: rotate(360deg);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
X = Re([
|
|
103
|
+
F("maptiler-geocode-loading-icon")
|
|
104
|
+
], X);
|
|
105
|
+
var We = Object.getOwnPropertyDescriptor, Ve = (e, t, i, n) => {
|
|
106
|
+
for (var s = n > 1 ? void 0 : n ? We(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
107
|
+
(p = e[r]) && (s = p(s) || s);
|
|
108
|
+
return s;
|
|
109
|
+
};
|
|
110
|
+
let Y = class extends L {
|
|
111
|
+
render() {
|
|
112
|
+
return q`
|
|
113
|
+
<svg viewBox="0 0 60.006 21.412" width="14" height="20">
|
|
114
|
+
<path
|
|
115
|
+
d="M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"
|
|
116
|
+
/>
|
|
117
|
+
</svg>
|
|
118
|
+
`;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
Y.styles = I`
|
|
122
|
+
svg {
|
|
123
|
+
display: block;
|
|
124
|
+
fill: var(--color-icon-button);
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
Y = Ve([
|
|
128
|
+
F("maptiler-geocode-reverse-geocoding-icon")
|
|
129
|
+
], Y);
|
|
130
|
+
var ze = Object.getOwnPropertyDescriptor, qe = (e, t, i, n) => {
|
|
131
|
+
for (var s = n > 1 ? void 0 : n ? ze(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
132
|
+
(p = e[r]) && (s = p(s) || s);
|
|
133
|
+
return s;
|
|
134
|
+
};
|
|
135
|
+
let ee = class extends L {
|
|
136
|
+
render() {
|
|
137
|
+
return q`
|
|
138
|
+
<svg
|
|
139
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
140
|
+
width="13"
|
|
141
|
+
height="13"
|
|
142
|
+
viewBox="0 0 13 13"
|
|
143
|
+
>
|
|
144
|
+
<circle cx="4.789" cy="4.787" r="3.85" />
|
|
145
|
+
<path d="M12.063 12.063 7.635 7.635" />
|
|
146
|
+
</svg>
|
|
147
|
+
`;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
ee.styles = I`
|
|
151
|
+
circle {
|
|
152
|
+
stroke-width: 1.875;
|
|
153
|
+
fill: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
path {
|
|
157
|
+
stroke-width: 1.875;
|
|
158
|
+
stroke-linecap: round;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
svg {
|
|
162
|
+
display: block;
|
|
163
|
+
stroke: var(--color-icon-button);
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
ee = qe([
|
|
167
|
+
F("maptiler-geocode-search-icon")
|
|
168
|
+
], ee);
|
|
169
|
+
function Ne(e, t, i) {
|
|
170
|
+
const n = t[1], s = t[0], r = n - s;
|
|
171
|
+
return e === n && i ? e : ((e - s) % r + r) % r + s;
|
|
172
|
+
}
|
|
173
|
+
let P;
|
|
174
|
+
async function Ke(e, t, i) {
|
|
175
|
+
for (const n of t ?? [])
|
|
176
|
+
if (!(e && (n.minZoom != null && n.minZoom > e[0] || n.maxZoom != null && n.maxZoom < e[0]))) {
|
|
177
|
+
if (n.type === "fixed")
|
|
178
|
+
return n.coordinates.join(",");
|
|
179
|
+
if (n.type === "client-geolocation")
|
|
180
|
+
if (P && n.cachedLocationExpiry && P.time + n.cachedLocationExpiry > Date.now()) {
|
|
181
|
+
if (P.coords)
|
|
182
|
+
return P.coords;
|
|
183
|
+
} else {
|
|
184
|
+
let s;
|
|
185
|
+
try {
|
|
186
|
+
return s = await new Promise((r, p) => {
|
|
187
|
+
i.signal.addEventListener("abort", () => {
|
|
188
|
+
p(Error("aborted"));
|
|
189
|
+
}), navigator.geolocation.getCurrentPosition(
|
|
190
|
+
(m) => {
|
|
191
|
+
r([m.coords.longitude, m.coords.latitude].map((U) => U.toFixed(6)).join(","));
|
|
192
|
+
},
|
|
193
|
+
(m) => {
|
|
194
|
+
p(m);
|
|
195
|
+
},
|
|
196
|
+
n
|
|
197
|
+
);
|
|
198
|
+
}), s;
|
|
199
|
+
} catch {
|
|
200
|
+
} finally {
|
|
201
|
+
n.cachedLocationExpiry && (P = {
|
|
202
|
+
time: Date.now(),
|
|
203
|
+
coords: s
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
if (i.signal.aborted)
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (n.type === "server-geolocation")
|
|
210
|
+
return "ip";
|
|
211
|
+
if (e && n.type === "map-center")
|
|
212
|
+
return e[1].toFixed(6) + "," + e[2].toFixed(6);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
const Ze = ".sprite-icon{align-self:center;justify-self:center;opacity:.75;background-repeat:no-repeat}li{text-align:left;cursor:default;display:grid;grid-template-columns:40px 1fr;color:var(--color-text);padding:8px 0;font-size:14px;line-height:18px;min-width:fit-content;outline:0}li:first-child{padding-top:10px}li:last-child{padding-bottom:10px}li.picked{background-color:#e7edff}li.picked .secondary{color:#96a4c7;padding-left:4px}li.picked .line2{color:#96a4c7}li.selected{background-color:#f3f6ff;animation:backAndForth 5s linear infinite}li.selected .primary{color:#2b8bfb}li.selected .secondary{color:#a2adc7;padding-left:4px}li.selected .line2{color:#a2adc7}li>img{align-self:center;justify-self:center;opacity:.75}.texts{padding:0 17px 0 0}.texts>*{white-space:nowrap;display:block;min-width:fit-content}.primary{font-weight:600}.secondary{color:#aeb6c7;padding-left:4px}.line2{color:#aeb6c7}@keyframes backAndForth{0%{transform:translate(0)}10%{transform:translate(0)}45%{transform:translate(calc(-100% + 270px))}55%{transform:translate(calc(-100% + 270px))}90%{transform:translate(0)}to{transform:translate(0)}}";
|
|
216
|
+
var Qe = Object.defineProperty, He = Object.getOwnPropertyDescriptor, ge = (e) => {
|
|
217
|
+
throw TypeError(e);
|
|
218
|
+
}, _ = (e, t, i, n) => {
|
|
219
|
+
for (var s = n > 1 ? void 0 : n ? He(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
220
|
+
(p = e[r]) && (s = (n ? p(t, i, s) : p(s)) || s);
|
|
221
|
+
return n && s && Qe(t, i, s), s;
|
|
222
|
+
}, me = (e, t, i) => t.has(e) || ge("Cannot " + i), u = (e, t, i) => (me(e, t, "read from private field"), i ? i.call(e) : t.get(e)), Je = (e, t, i) => t.has(e) ? ge("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), C = (e, t, i) => (me(e, t, "access private method"), i), d, W, B, g, ye, ve, re, te;
|
|
223
|
+
const xe = typeof devicePixelRatio > "u" || devicePixelRatio > 1.25, be = xe ? "@2x" : "", S = xe ? 2 : 1;
|
|
224
|
+
let k, we, w = class extends L {
|
|
225
|
+
constructor() {
|
|
226
|
+
super(...arguments), Je(this, d), this.itemStyle = "default", this.showPlaceType = "if-needed", this.missingIconsCache = /* @__PURE__ */ new Set(), this.iconsBaseUrl = "", this.index = 0;
|
|
227
|
+
}
|
|
228
|
+
willUpdate(e) {
|
|
229
|
+
e.has("feature") && u(this, d, W) && (this.index = u(this, d, W).length, C(this, d, re).call(this));
|
|
230
|
+
}
|
|
231
|
+
render() {
|
|
232
|
+
return f`
|
|
233
|
+
<li
|
|
234
|
+
tabindex="-1"
|
|
235
|
+
role="option"
|
|
236
|
+
aria-selected=${this.itemStyle === "selected"}
|
|
237
|
+
aria-checked=${this.itemStyle === "picked"}
|
|
238
|
+
class=${this.itemStyle}
|
|
239
|
+
@click=${() => this.dispatchEvent(new CustomEvent("select"))}
|
|
240
|
+
>
|
|
241
|
+
${k && this.spriteIcon ? f`
|
|
242
|
+
<div
|
|
243
|
+
class="sprite-icon"
|
|
244
|
+
style=${Be({
|
|
245
|
+
width: `${this.spriteIcon.width / S}px`,
|
|
246
|
+
height: `${this.spriteIcon.height / S}px`,
|
|
247
|
+
backgroundImage: `url(${this.iconsBaseUrl}sprite${be}.png)`,
|
|
248
|
+
backgroundPosition: `-${this.spriteIcon.x / S}px -${this.spriteIcon.y / S}px`,
|
|
249
|
+
backgroundSize: `${k.width / S}px ${k.height / S}px`
|
|
250
|
+
})}
|
|
251
|
+
title=${u(this, d, g)}
|
|
252
|
+
/>
|
|
253
|
+
` : this.imageUrl ? f` <img src=${this.imageUrl} alt=${this.category} title=${u(this, d, g)} @error=${C(this, d, ve)} />` : this.feature?.address ? f` <img src=${this.iconsBaseUrl + "housenumber.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : this.feature?.id.startsWith("road.") ? f` <img src=${this.iconsBaseUrl + "road.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : this.feature?.id.startsWith("address.") ? f` <img src=${this.iconsBaseUrl + "street.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : this.feature?.id.startsWith("postal_code.") ? f` <img src=${this.iconsBaseUrl + "postal_code.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : this.feature?.id.startsWith("poi.") ? f` <img src=${this.iconsBaseUrl + "poi.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : u(this, d, B) ? f` <img src=${this.iconsBaseUrl + "reverse.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> ` : f` <img src=${this.iconsBaseUrl + "area.svg"} alt=${u(this, d, g)} title=${u(this, d, g)} /> `}
|
|
254
|
+
|
|
255
|
+
<span class="texts">
|
|
256
|
+
<span>
|
|
257
|
+
<span class="primary"> ${u(this, d, B) ? this.feature?.place_name : this.feature?.place_name.replace(/,.*/, "")} </span>
|
|
258
|
+
|
|
259
|
+
${this.showPlaceType === "always" || this.showPlaceType !== "never" && !this.feature?.address && !this.feature?.id.startsWith("road.") && !this.feature?.id.startsWith("address.") && !this.feature?.id.startsWith("postal_code.") && (!this.feature?.id.startsWith("poi.") || !this.imageUrl) && !u(this, d, B) ? f` <span class="secondary"> ${u(this, d, g)} </span> ` : Q}
|
|
260
|
+
</span>
|
|
261
|
+
|
|
262
|
+
<span class="line2"> ${u(this, d, B) ? this.feature?.text : this.feature?.place_name.replace(/[^,]*,?s*/, "")} </span>
|
|
263
|
+
</span>
|
|
264
|
+
</li>
|
|
265
|
+
`;
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
d = /* @__PURE__ */ new WeakSet();
|
|
269
|
+
W = function() {
|
|
270
|
+
return this.feature?.properties?.categories;
|
|
271
|
+
};
|
|
272
|
+
B = function() {
|
|
273
|
+
return this.feature?.place_type[0] === "reverse";
|
|
274
|
+
};
|
|
275
|
+
g = function() {
|
|
276
|
+
return this.feature?.properties?.categories?.join(", ") ?? this.feature?.place_type_name?.[0] ?? this.feature?.place_type[0];
|
|
277
|
+
};
|
|
278
|
+
ye = function() {
|
|
279
|
+
we ??= fetch(`${this.iconsBaseUrl}sprite${be}.json`).then((e) => e.json()).then((e) => {
|
|
280
|
+
k = e;
|
|
281
|
+
}).catch(() => {
|
|
282
|
+
k = null;
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
ve = function() {
|
|
286
|
+
this.imageUrl && this.missingIconsCache.add(this.imageUrl), C(this, d, re).call(this);
|
|
287
|
+
};
|
|
288
|
+
re = function() {
|
|
289
|
+
k !== void 0 ? C(this, d, te).call(this) : (C(this, d, ye).call(this), we?.then(() => {
|
|
290
|
+
C(this, d, te).call(this);
|
|
291
|
+
}));
|
|
292
|
+
};
|
|
293
|
+
te = function() {
|
|
294
|
+
do {
|
|
295
|
+
if (this.index--, this.category = u(this, d, W)?.[this.index], this.spriteIcon = this.category ? k?.icons[this.category] : void 0, this.spriteIcon)
|
|
296
|
+
break;
|
|
297
|
+
this.imageUrl = this.category ? this.iconsBaseUrl + this.category.replace(/ /g, "_") + ".svg" : void 0;
|
|
298
|
+
} while (this.index > -1 && (!this.imageUrl || this.missingIconsCache.has(this.imageUrl)));
|
|
299
|
+
};
|
|
300
|
+
w.styles = I`
|
|
301
|
+
${fe(Ze)}
|
|
302
|
+
`;
|
|
303
|
+
_([
|
|
304
|
+
h({ type: Object })
|
|
305
|
+
], w.prototype, "feature", 2);
|
|
306
|
+
_([
|
|
307
|
+
h({ type: String })
|
|
308
|
+
], w.prototype, "itemStyle", 2);
|
|
309
|
+
_([
|
|
310
|
+
h({ type: String })
|
|
311
|
+
], w.prototype, "showPlaceType", 2);
|
|
312
|
+
_([
|
|
313
|
+
h({ attribute: !1 })
|
|
314
|
+
], w.prototype, "missingIconsCache", 2);
|
|
315
|
+
_([
|
|
316
|
+
h({ type: String })
|
|
317
|
+
], w.prototype, "iconsBaseUrl", 2);
|
|
318
|
+
_([
|
|
319
|
+
b()
|
|
320
|
+
], w.prototype, "category", 2);
|
|
321
|
+
_([
|
|
322
|
+
b()
|
|
323
|
+
], w.prototype, "imageUrl", 2);
|
|
324
|
+
_([
|
|
325
|
+
b()
|
|
326
|
+
], w.prototype, "spriteIcon", 2);
|
|
327
|
+
_([
|
|
328
|
+
b()
|
|
329
|
+
], w.prototype, "index", 2);
|
|
330
|
+
w = _([
|
|
331
|
+
F("maptiler-geocoder-feature-item")
|
|
332
|
+
], w);
|
|
333
|
+
const Xe = "form{font-family:Open Sans,Ubuntu,Helvetica Neue,Arial,Helvetica,sans-serif;position:relative;background-color:#fff;z-index:10;border-radius:4px;margin:0;transition:max-width .25s;box-shadow:0 2px 5px #33335926;--color-text: #444952;--color-icon-button: #444952;pointer-events:all}form,form *,form *:after,form *:before{box-sizing:border-box}form.can-collapse{max-width:29px}form.can-collapse input::placeholder{transition:opacity .25s;opacity:0}form{width:270px;max-width:270px}form:focus-within,form:hover{width:270px;max-width:270px}form input::placeholder,form:focus-within input::placeholder,form:hover input::placeholder{opacity:1}input{font:inherit;font-size:14px;flex-grow:1;min-height:29px;background-color:transparent;color:#444952;white-space:nowrap;overflow:hidden;border:0;margin:0;padding:0}input:focus{color:#444952;outline:0;outline:none;box-shadow:none}ul,div.error,div.no-results{background-color:#fff;border-radius:4px;left:0;list-style:none;margin:0;padding:0;position:absolute;width:100%;top:calc(100% + 6px);overflow:hidden}ul{font-size:14px;line-height:16px;box-shadow:0 5px 10px #33335926}div.error,div.no-results{font:inherit;line-height:18px;font-size:12px;display:flex;gap:16px}div.error{padding:16px;font-weight:600;color:#e25041;background-color:#fbeae8}div.error div{flex-grow:1}div.error maptiler-geocode-fail-icon{flex-shrink:0;width:20px;height:20px}div.error button{flex-shrink:0}div.error button maptiler-geocode-clear-icon{--color-icon-button: #e25041}div.error button:hover maptiler-geocode-clear-icon,div.error button:active maptiler-geocode-clear-icon{--color-icon-button: inherit}div.no-results{padding:14px 24px 14px 16px;font-weight:400;color:#6b7c93;box-shadow:0 5px 10px #33335926}div.no-results maptiler-geocode-fail-icon{margin-top:4px;flex-shrink:0;width:20px;height:20px}ul.options.open-on-top{top:auto;bottom:calc(100% + 6px)}button{padding:0;margin:0;border:0;background-color:transparent;height:auto;width:auto}button:hover{background-color:transparent}button:hover,button:active{--color-icon-button: #2b8bfb}.input-group{display:flex;align-items:stretch;gap:7px;padding-inline:8px;border-radius:4px;overflow:hidden}.input-group:focus-within{outline:#2b8bfb solid 2px}.search-button{flex-shrink:0}.clear-button-container{display:flex;display:none;position:relative;align-items:stretch}.clear-button-container.displayable{display:flex;flex-shrink:0}:host(.maptiler-geocoder):not(:empty){box-shadow:none}:host(.maptiler-geocoder) .input-group{border:white solid 2px}:host(.maptiler-geocoder) .input-group:focus-within{border:#2b8bfb solid 2px;outline:0;outline:none}:host(.maptiler-geocoder) form.can-collapse{max-width:33px}:host(.maptiler-geocoder) form,:host(.maptiler-geocoder) form:focus-within,:host(.maptiler-geocoder) form:hover{width:270px;max-width:270px}:host(.leaflet-geocoder) .input-group{border:white solid 1px}:host(.leaflet-geocoder) form.can-collapse{max-width:30px}";
|
|
334
|
+
var Ye = Object.defineProperty, et = Object.getOwnPropertyDescriptor, _e = (e) => {
|
|
335
|
+
throw TypeError(e);
|
|
336
|
+
}, l = (e, t, i, n) => {
|
|
337
|
+
for (var s = n > 1 ? void 0 : n ? et(t, i) : t, r = e.length - 1, p; r >= 0; r--)
|
|
338
|
+
(p = e[r]) && (s = (n ? p(t, i, s) : p(s)) || s);
|
|
339
|
+
return n && s && Ye(t, i, s), s;
|
|
340
|
+
}, oe = (e, t, i) => t.has(e) || _e("Cannot " + i), x = (e, t, i) => (oe(e, t, "read from private field"), i ? i.call(e) : t.get(e)), T = (e, t, i) => t.has(e) ? _e("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), A = (e, t, i, n) => (oe(e, t, "write to private field"), t.set(e, i), i), c = (e, t, i) => (oe(e, t, "access private method"), i), V, R, E, ie, G, o, z, $e, ke, ae, v, le, N, ne, ce, $, he, K, Ie, se, Le, Fe, Oe, Se, Te;
|
|
341
|
+
let a = class extends L {
|
|
342
|
+
constructor() {
|
|
343
|
+
super(...arguments), T(this, o), this.clearListOnPick = !1, this.clearOnBlur = !1, this.collapsed = !1, this.excludeTypes = !1, this.exhaustiveReverseGeocoding = !1, this.fetchFullGeometryOnPick = !1, this.keepListOpen = !1, this.openListOnTop = !1, this.reverseActive = !1, this.searchValue = "", this.selectedItemIndex = -1, this.cachedFeatures = [], this.lastSearchUrl = "", this.focused = !1, this.focusedDelayed = !1, T(this, V, !1), T(this, R, !1), T(this, E), T(this, ie, /* @__PURE__ */ new Set()), T(this, G);
|
|
344
|
+
}
|
|
345
|
+
firstUpdated() {
|
|
346
|
+
A(this, V, !0);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Set the options of this instance.
|
|
350
|
+
*
|
|
351
|
+
* @param options options to set
|
|
352
|
+
*/
|
|
353
|
+
setOptions(e) {
|
|
354
|
+
const t = { ...e };
|
|
355
|
+
for (const i of Object.keys(t))
|
|
356
|
+
tt.includes(i) || delete t[i];
|
|
357
|
+
Object.assign(this, t);
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Set the content of search input box.
|
|
361
|
+
*
|
|
362
|
+
* @param value text to set
|
|
363
|
+
*/
|
|
364
|
+
setQuery(e) {
|
|
365
|
+
c(this, o, ce).call(this, e), c(this, o, ne).call(this);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Set the content of search input box and immediately submit it.
|
|
369
|
+
*
|
|
370
|
+
* @param value text to set and submit
|
|
371
|
+
*/
|
|
372
|
+
submitQuery(e) {
|
|
373
|
+
c(this, o, he).call(this, e);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Clear search result list.
|
|
377
|
+
*/
|
|
378
|
+
clearList() {
|
|
379
|
+
c(this, o, $).call(this), this.picked = void 0, this.selectedItemIndex = -1;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Focus the search input box.
|
|
383
|
+
*
|
|
384
|
+
* @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
|
|
385
|
+
*/
|
|
386
|
+
focus(e) {
|
|
387
|
+
this.input.focus(e);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Blur the search input box.
|
|
391
|
+
*/
|
|
392
|
+
blur() {
|
|
393
|
+
this.input.blur();
|
|
394
|
+
}
|
|
395
|
+
addEventListener(e, t, i) {
|
|
396
|
+
super.addEventListener(e, t, i);
|
|
397
|
+
}
|
|
398
|
+
removeEventListener(e, t, i) {
|
|
399
|
+
super.removeEventListener(e, t, i);
|
|
400
|
+
}
|
|
401
|
+
/** @internal */
|
|
402
|
+
handleMapChange(e) {
|
|
403
|
+
A(this, G, e);
|
|
404
|
+
}
|
|
405
|
+
/** @internal */
|
|
406
|
+
handleMapClick(e) {
|
|
407
|
+
this.reverseActive && c(this, o, Ie).call(this, e);
|
|
408
|
+
}
|
|
409
|
+
willUpdate(e) {
|
|
410
|
+
e.has("error") && this.error && console.error("[MapTilerGeocodingControl] Error:", this.error), e.has("enableReverse") && (this.reverseActive = this.enableReverse === "always"), ["picked"].some((t) => e.has(t)) && this.picked && (this.clearListOnPick && c(this, o, $).call(this), this.selectedItemIndex = -1), ["searchValue", "minLength"].some((t) => e.has(t)) && x(this, o, ae) && (c(this, o, $).call(this), this.error = void 0), ["focused"].some((t) => e.has(t)) && setTimeout(() => {
|
|
411
|
+
this.focusedDelayed = this.focused, this.clearOnBlur && !this.focused && (this.searchValue = "");
|
|
412
|
+
}, 100), ["selectFirst", "listFeatures", "selectedItemIndex", "picked"].some((t) => e.has(t)) && this.selectFirst !== !1 && this.listFeatures?.length && this.selectedItemIndex == -1 && !this.picked && (this.selectedItemIndex = 0), ["listFeatures", "selectedItemIndex"].some((t) => e.has(t)) && c(this, o, v).call(this, "select", { feature: x(this, o, z) }), ["picked"].some((t) => e.has(t)) && this.picked && this.picked.id !== e.get("picked")?.id && (this.fetchFullGeometryOnPick && !this.picked.address && this.picked.geometry.type === "Point" && this.picked.place_type[0] !== "reverse" ? c(this, o, K).call(this, this.picked.id, { byId: !0 }) : Promise.resolve()).then(
|
|
413
|
+
() => {
|
|
414
|
+
c(this, o, v).call(this, "pick", { feature: this.picked });
|
|
415
|
+
},
|
|
416
|
+
(t) => {
|
|
417
|
+
t && typeof t == "object" && "name" in t && t.name === "AbortError" || (this.error = t, c(this, o, v).call(this, "pick", { feature: this.picked }));
|
|
418
|
+
}
|
|
419
|
+
), ["listFeatures", "focusedDelayed"].some((t) => e.has(t)) && (x(this, o, $e) ? (c(this, o, v).call(this, "featuresshow"), A(this, R, !0)) : x(this, R) && c(this, o, v).call(this, "featureshide")), ["reverseActive"].some((t) => e.has(t)) && c(this, o, v).call(this, "reversetoggle", { reverse: this.reverseActive });
|
|
420
|
+
}
|
|
421
|
+
render() {
|
|
422
|
+
return f`
|
|
423
|
+
<form @submit=${c(this, o, le)} class=${j({ "can-collapse": this.collapsed && this.searchValue === "" })}>
|
|
424
|
+
<div class="input-group">
|
|
425
|
+
<button
|
|
426
|
+
class="search-button"
|
|
427
|
+
type="button"
|
|
428
|
+
@click=${() => {
|
|
429
|
+
this.input.focus();
|
|
430
|
+
}}
|
|
431
|
+
>
|
|
432
|
+
<maptiler-geocode-search-icon></maptiler-geocode-search-icon>
|
|
433
|
+
</button>
|
|
434
|
+
|
|
435
|
+
<input
|
|
436
|
+
.value=${this.searchValue}
|
|
437
|
+
@focus=${() => this.focused = !0}
|
|
438
|
+
@blur=${() => this.focused = !1}
|
|
439
|
+
@click=${() => this.focused = !0}
|
|
440
|
+
@keydown=${c(this, o, se)}
|
|
441
|
+
@input=${c(this, o, Le)}
|
|
442
|
+
@change=${() => this.picked = void 0}
|
|
443
|
+
placeholder=${this.placeholder ?? "Search"}
|
|
444
|
+
aria-label=${this.placeholder ?? "Search"}
|
|
445
|
+
/>
|
|
446
|
+
|
|
447
|
+
<div class="clear-button-container ${j({ displayable: this.searchValue !== "" })}">
|
|
448
|
+
${x(this, o, ke) ? f`<maptiler-geocode-loading-icon></maptiler-geocode-loading-icon>` : f`
|
|
449
|
+
<button type="button" @click=${c(this, o, Te)} title=${this.clearButtonTitle ?? "clear"}>
|
|
450
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
451
|
+
</button>
|
|
452
|
+
`}
|
|
453
|
+
</div>
|
|
454
|
+
|
|
455
|
+
${this.enableReverse === "button" ? f`
|
|
456
|
+
<button
|
|
457
|
+
type="button"
|
|
458
|
+
class=${j({ active: this.reverseActive })}
|
|
459
|
+
title=${this.reverseButtonTitle ?? "toggle reverse geocoding"}
|
|
460
|
+
@click=${() => this.reverseActive = !this.reverseActive}
|
|
461
|
+
>
|
|
462
|
+
<maptiler-geocode-reverse-geocoding-icon></maptiler-geocode-reverse-geocoding-icon>
|
|
463
|
+
</button>
|
|
464
|
+
` : Q}
|
|
465
|
+
|
|
466
|
+
<!-- <slot /> -->
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
${this.error ? f`
|
|
470
|
+
<div class="error">
|
|
471
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
472
|
+
|
|
473
|
+
<div>${this.errorMessage ?? "Something went wrong…"}</div>
|
|
474
|
+
|
|
475
|
+
<button @click=${() => this.error = void 0}>
|
|
476
|
+
<maptiler-geocode-clear-icon></maptiler-geocode-clear-icon>
|
|
477
|
+
</button>
|
|
478
|
+
</div>
|
|
479
|
+
` : !this.focusedDelayed && !this.keepListOpen || this.listFeatures === void 0 ? Q : this.listFeatures.length === 0 ? f`
|
|
480
|
+
<div class="no-results">
|
|
481
|
+
<maptiler-geocode-fail-icon></maptiler-geocode-fail-icon>
|
|
482
|
+
|
|
483
|
+
<div>
|
|
484
|
+
${this.noResultsMessage ?? "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
` : f`
|
|
488
|
+
<ul class="options ${j({ "open-on-top": this.openListOnTop })}" @mouseleave=${c(this, o, Se)} @keydown=${c(this, o, se)} role="listbox">
|
|
489
|
+
${Pe(
|
|
490
|
+
this.listFeatures,
|
|
491
|
+
(e) => e.id + (e.address ? "," + e.address : ""),
|
|
492
|
+
(e, t) => f`
|
|
493
|
+
<maptiler-geocoder-feature-item
|
|
494
|
+
.feature=${e}
|
|
495
|
+
.showPlaceType=${this.showPlaceType ?? "if-needed"}
|
|
496
|
+
itemStyle=${this.selectedItemIndex === t ? "selected" : this.picked?.id === e.id ? "picked" : "default"}
|
|
497
|
+
@mouseenter=${() => {
|
|
498
|
+
c(this, o, Oe).call(this, t);
|
|
499
|
+
}}
|
|
500
|
+
@select=${() => {
|
|
501
|
+
c(this, o, Fe).call(this, e);
|
|
502
|
+
}}
|
|
503
|
+
.missingIconsCache=${x(this, ie)}
|
|
504
|
+
.iconsBaseUrl=${this.iconsBaseUrl ?? "https://cdn.maptiler.com/maptiler-geocoding-control/v3.0.0-rc.2/icons/"}
|
|
505
|
+
>
|
|
506
|
+
${e.place_name}
|
|
507
|
+
</maptiler-geocoder-feature-item>
|
|
508
|
+
`
|
|
509
|
+
)}
|
|
510
|
+
</ul>
|
|
511
|
+
`}
|
|
512
|
+
</form>
|
|
513
|
+
`;
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
V = /* @__PURE__ */ new WeakMap();
|
|
517
|
+
R = /* @__PURE__ */ new WeakMap();
|
|
518
|
+
E = /* @__PURE__ */ new WeakMap();
|
|
519
|
+
ie = /* @__PURE__ */ new WeakMap();
|
|
520
|
+
G = /* @__PURE__ */ new WeakMap();
|
|
521
|
+
o = /* @__PURE__ */ new WeakSet();
|
|
522
|
+
z = function() {
|
|
523
|
+
return this.listFeatures?.[this.selectedItemIndex];
|
|
524
|
+
};
|
|
525
|
+
$e = function() {
|
|
526
|
+
return !!this.listFeatures?.length && (this.focusedDelayed || this.keepListOpen);
|
|
527
|
+
};
|
|
528
|
+
ke = function() {
|
|
529
|
+
return this.abortController !== void 0;
|
|
530
|
+
};
|
|
531
|
+
ae = function() {
|
|
532
|
+
return this.searchValue.length < (this.minLength ?? 2);
|
|
533
|
+
};
|
|
534
|
+
v = function(e, ...[t]) {
|
|
535
|
+
x(this, V) && this.dispatchEvent(
|
|
536
|
+
new CustomEvent(e, {
|
|
537
|
+
bubbles: !0,
|
|
538
|
+
composed: !0,
|
|
539
|
+
detail: t
|
|
540
|
+
})
|
|
541
|
+
);
|
|
542
|
+
};
|
|
543
|
+
le = function(e) {
|
|
544
|
+
e?.preventDefault(), this.focused = !1, clearTimeout(x(this, E)), this.selectedItemIndex > -1 && this.listFeatures ? (this.picked = this.listFeatures[this.selectedItemIndex], this.searchValue = this.picked.place_type[0] === "reverse" ? this.picked.place_name : this.picked.place_name.replace(/,.*/, ""), this.error = void 0, this.selectedItemIndex = -1) : this.searchValue && c(this, o, K).call(this, this.searchValue, { exact: !0 }).then(() => {
|
|
545
|
+
this.picked = void 0;
|
|
546
|
+
}).catch((t) => this.error = t);
|
|
547
|
+
};
|
|
548
|
+
N = function(e) {
|
|
549
|
+
try {
|
|
550
|
+
return Me(e, 6);
|
|
551
|
+
} catch {
|
|
552
|
+
return !1;
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
ne = function() {
|
|
556
|
+
setTimeout(() => {
|
|
557
|
+
this.input.focus(), this.focused = !0, this.input.select();
|
|
558
|
+
});
|
|
559
|
+
};
|
|
560
|
+
ce = function(e) {
|
|
561
|
+
if (this.searchValue = e, c(this, o, v).call(this, "querychange", { query: this.searchValue, reverseCoords: c(this, o, N).call(this, e) }), this.error = void 0, this.picked = void 0, this.showResultsWhileTyping !== !1) {
|
|
562
|
+
if (clearTimeout(x(this, E)), x(this, o, ae))
|
|
563
|
+
return;
|
|
564
|
+
const t = this.searchValue;
|
|
565
|
+
A(this, E, window.setTimeout(() => {
|
|
566
|
+
c(this, o, K).call(this, t).catch((i) => this.error = i);
|
|
567
|
+
}, this.debounceSearch ?? 200));
|
|
568
|
+
} else
|
|
569
|
+
c(this, o, $).call(this);
|
|
570
|
+
};
|
|
571
|
+
$ = function() {
|
|
572
|
+
this.listFeatures !== void 0 && (this.listFeatures = void 0, c(this, o, v).call(this, "featuresclear"));
|
|
573
|
+
};
|
|
574
|
+
he = function(e) {
|
|
575
|
+
this.searchValue = e, c(this, o, v).call(this, "querychange", { query: this.searchValue, reverseCoords: c(this, o, N).call(this, e) }), this.selectedItemIndex = -1, c(this, o, le).call(this);
|
|
576
|
+
};
|
|
577
|
+
K = async function(e, { byId: t = !1, exact: i = !1 } = {}) {
|
|
578
|
+
this.error = void 0, this.abortController?.abort();
|
|
579
|
+
const n = new AbortController();
|
|
580
|
+
this.abortController = n;
|
|
581
|
+
try {
|
|
582
|
+
const s = this.apiUrl ?? "https://api.maptiler.com/geocoding", r = c(this, o, N).call(this, e), p = new URL(s + "/" + encodeURIComponent(r ? `${r.decimalLongitude},${r.decimalLatitude}` : e) + ".json"), m = p.searchParams;
|
|
583
|
+
this.language !== void 0 && m.set("language", Array.isArray(this.language) ? this.language.join(",") : this.language ?? "");
|
|
584
|
+
const [U] = x(this, G) ?? [void 0];
|
|
585
|
+
let O = (!r || this.reverseGeocodingTypes === void 0 ? this.types : this.reverseGeocodingTypes)?.map(
|
|
586
|
+
(y) => typeof y == "string" ? y : U === void 0 || (y[0] ?? 0) <= U && U < (y[1] ?? 1 / 0) ? y[2] : void 0
|
|
587
|
+
).filter((y) => y !== void 0);
|
|
588
|
+
O && (O = [...new Set(O)], m.set("types", O.join(",")));
|
|
589
|
+
const pe = !r || this.reverseGeocodingExcludeTypes === void 0 ? this.excludeTypes : this.reverseGeocodingExcludeTypes;
|
|
590
|
+
if (pe && m.set("excludeTypes", String(pe)), this.bbox && m.set("bbox", this.bbox.map((y) => y.toFixed(6)).join(",")), this.country && m.set("country", Array.isArray(this.country) ? this.country.join(",") : this.country), this.worldview && m.set("worldview", this.worldview), !t && !r) {
|
|
591
|
+
const y = this.proximity ?? [{ type: "server-geolocation" }], ue = await Ke(x(this, G), y, n);
|
|
592
|
+
ue && m.set("proximity", ue), (i || this.showResultsWhileTyping === !1) && m.set("autocomplete", "false"), m.set("fuzzyMatch", String(this.fuzzyMatch !== !1));
|
|
593
|
+
}
|
|
594
|
+
const de = this.limit ?? 5, Z = this.reverseGeocodingLimit ?? de;
|
|
595
|
+
Z > 1 && O?.length !== 1 && console.warn("[MapTilerGeocodingControl] Warning: For reverse geocoding when limit > 1 then types must contain single value."), r ? (Z === 1 || this.exhaustiveReverseGeocoding || O?.length === 1) && m.set("limit", String(Z)) : m.set("limit", String(de)), this.apiKey && m.set("key", this.apiKey), this.adjustUrl?.(p);
|
|
596
|
+
const Ce = p.searchParams.get("types") === "" && p.searchParams.get("excludeTypes") !== "true", D = p.toString();
|
|
597
|
+
if (D === this.lastSearchUrl) {
|
|
598
|
+
t ? (this.clearListOnPick && c(this, o, $).call(this), this.picked = this.cachedFeatures[0]) : (this.listFeatures = this.cachedFeatures, c(this, o, v).call(this, "featureslisted", { features: this.listFeatures }), this.listFeatures[this.selectedItemIndex]?.id !== x(this, o, z)?.id && (this.selectedItemIndex = -1));
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
c(this, o, v).call(this, "request", { urlObj: p }), this.lastSearchUrl = D;
|
|
602
|
+
let M;
|
|
603
|
+
if (Ce)
|
|
604
|
+
M = { type: "FeatureCollection", features: [] };
|
|
605
|
+
else {
|
|
606
|
+
const y = await fetch(D, {
|
|
607
|
+
signal: n.signal,
|
|
608
|
+
...this.fetchParameters
|
|
609
|
+
});
|
|
610
|
+
if (!y.ok)
|
|
611
|
+
throw new Error(await y.text());
|
|
612
|
+
M = await y.json();
|
|
613
|
+
}
|
|
614
|
+
c(this, o, v).call(this, "response", { url: D, featureCollection: M }), t ? (this.clearListOnPick && c(this, o, $).call(this), this.picked = M.features[0], this.cachedFeatures = [this.picked]) : (this.listFeatures = M.features.filter(this.filter ?? (() => !0)), r && this.listFeatures.unshift({
|
|
615
|
+
type: "Feature",
|
|
616
|
+
properties: {},
|
|
617
|
+
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
618
|
+
id: `reverse_${r.decimalLongitude}_${r.decimalLatitude}`,
|
|
619
|
+
text: `${r.decimalLatitude}, ${r.decimalLongitude}`,
|
|
620
|
+
place_name: r.toCoordinateFormat("DMS"),
|
|
621
|
+
/* eslint-enable @typescript-eslint/restrict-template-expressions */
|
|
622
|
+
place_type: ["reverse"],
|
|
623
|
+
place_type_name: ["reverse"],
|
|
624
|
+
center: [r.decimalLongitude, r.decimalLatitude],
|
|
625
|
+
bbox: [r.decimalLongitude, r.decimalLatitude, r.decimalLongitude, r.decimalLatitude],
|
|
626
|
+
geometry: {
|
|
627
|
+
type: "Point",
|
|
628
|
+
coordinates: [r.decimalLongitude, r.decimalLatitude]
|
|
629
|
+
}
|
|
630
|
+
}), c(this, o, v).call(this, "featureslisted", { features: this.listFeatures }), this.cachedFeatures = this.listFeatures, this.listFeatures[this.selectedItemIndex]?.id !== x(this, o, z)?.id && (this.selectedItemIndex = -1), r && this.input.focus());
|
|
631
|
+
} catch (s) {
|
|
632
|
+
if (s && typeof s == "object" && "name" in s && s.name === "AbortError")
|
|
633
|
+
return;
|
|
634
|
+
throw s;
|
|
635
|
+
} finally {
|
|
636
|
+
n === this.abortController && (this.abortController = void 0);
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
Ie = function(e) {
|
|
640
|
+
this.reverseActive = this.enableReverse === "always", c(this, o, $).call(this), this.picked = void 0, c(this, o, he).call(this, `${e[1].toFixed(6)}, ${Ne(e[0], [-180, 180], !0).toFixed(6)}`), c(this, o, ne).call(this);
|
|
641
|
+
};
|
|
642
|
+
se = function(e) {
|
|
643
|
+
if (!this.listFeatures)
|
|
644
|
+
return;
|
|
645
|
+
const t = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0;
|
|
646
|
+
t && (this.input.focus(), this.focused = !0, e.preventDefault(), this.picked && this.selectedItemIndex === -1 && (this.selectedItemIndex = this.listFeatures.findIndex((i) => i.id === this.picked?.id)), this.selectedItemIndex === (this.picked || this.selectFirst !== !1 ? 0 : -1) && t === -1 && (this.selectedItemIndex = this.listFeatures.length), this.selectedItemIndex += t, this.selectedItemIndex >= this.listFeatures.length && (this.selectedItemIndex = -1), this.selectedItemIndex < 0 && (this.picked || this.selectFirst !== !1) && (this.selectedItemIndex = 0));
|
|
647
|
+
};
|
|
648
|
+
Le = function(e) {
|
|
649
|
+
c(this, o, ce).call(this, e.target.value);
|
|
650
|
+
};
|
|
651
|
+
Fe = function(e) {
|
|
652
|
+
(!this.picked || this.picked.id !== e.id) && (this.picked = e, this.searchValue = e.place_name);
|
|
653
|
+
};
|
|
654
|
+
Oe = function(e) {
|
|
655
|
+
this.selectedItemIndex = e;
|
|
656
|
+
};
|
|
657
|
+
Se = function() {
|
|
658
|
+
(!this.selectFirst || this.picked) && (this.selectedItemIndex = -1);
|
|
659
|
+
};
|
|
660
|
+
Te = function() {
|
|
661
|
+
this.searchValue = "", c(this, o, v).call(this, "queryclear"), this.picked = void 0, this.input.focus();
|
|
662
|
+
};
|
|
663
|
+
a.styles = I`
|
|
664
|
+
${fe(Xe)}
|
|
665
|
+
`;
|
|
666
|
+
l([
|
|
667
|
+
h({ attribute: !1 })
|
|
668
|
+
], a.prototype, "adjustUrl", 2);
|
|
669
|
+
l([
|
|
670
|
+
h({ type: String })
|
|
671
|
+
], a.prototype, "apiKey", 2);
|
|
672
|
+
l([
|
|
673
|
+
h({ type: String })
|
|
674
|
+
], a.prototype, "apiUrl", 2);
|
|
675
|
+
l([
|
|
676
|
+
h({ type: Array })
|
|
677
|
+
], a.prototype, "bbox", 2);
|
|
678
|
+
l([
|
|
679
|
+
h({ type: String })
|
|
680
|
+
], a.prototype, "clearButtonTitle", 2);
|
|
681
|
+
l([
|
|
682
|
+
h({ type: Boolean })
|
|
683
|
+
], a.prototype, "clearListOnPick", 2);
|
|
684
|
+
l([
|
|
685
|
+
h({ type: Boolean })
|
|
686
|
+
], a.prototype, "clearOnBlur", 2);
|
|
687
|
+
l([
|
|
688
|
+
h({ type: Boolean })
|
|
689
|
+
], a.prototype, "collapsed", 2);
|
|
690
|
+
l([
|
|
691
|
+
h({ attribute: !1 })
|
|
692
|
+
], a.prototype, "country", 2);
|
|
693
|
+
l([
|
|
694
|
+
h({ type: Number })
|
|
695
|
+
], a.prototype, "debounceSearch", 2);
|
|
696
|
+
l([
|
|
697
|
+
h({ type: String })
|
|
698
|
+
], a.prototype, "enableReverse", 2);
|
|
699
|
+
l([
|
|
700
|
+
h({ type: String })
|
|
701
|
+
], a.prototype, "errorMessage", 2);
|
|
702
|
+
l([
|
|
703
|
+
h({ type: Boolean })
|
|
704
|
+
], a.prototype, "excludeTypes", 2);
|
|
705
|
+
l([
|
|
706
|
+
h({ type: Boolean })
|
|
707
|
+
], a.prototype, "exhaustiveReverseGeocoding", 2);
|
|
708
|
+
l([
|
|
709
|
+
h({ type: Boolean })
|
|
710
|
+
], a.prototype, "fetchFullGeometryOnPick", 2);
|
|
711
|
+
l([
|
|
712
|
+
h({ type: Object })
|
|
713
|
+
], a.prototype, "fetchParameters", 2);
|
|
714
|
+
l([
|
|
715
|
+
h({ attribute: !1 })
|
|
716
|
+
], a.prototype, "filter", 2);
|
|
717
|
+
l([
|
|
718
|
+
h({ type: Object })
|
|
719
|
+
], a.prototype, "fuzzyMatch", 2);
|
|
720
|
+
l([
|
|
721
|
+
h({ type: String })
|
|
722
|
+
], a.prototype, "iconsBaseUrl", 2);
|
|
723
|
+
l([
|
|
724
|
+
h({ type: Boolean })
|
|
725
|
+
], a.prototype, "keepListOpen", 2);
|
|
726
|
+
l([
|
|
727
|
+
h({ attribute: !1 })
|
|
728
|
+
], a.prototype, "language", 2);
|
|
729
|
+
l([
|
|
730
|
+
h({ type: Number })
|
|
731
|
+
], a.prototype, "limit", 2);
|
|
732
|
+
l([
|
|
733
|
+
h({ type: Number })
|
|
734
|
+
], a.prototype, "minLength", 2);
|
|
735
|
+
l([
|
|
736
|
+
h({ type: String })
|
|
737
|
+
], a.prototype, "noResultsMessage", 2);
|
|
738
|
+
l([
|
|
739
|
+
h({ type: Boolean })
|
|
740
|
+
], a.prototype, "openListOnTop", 2);
|
|
741
|
+
l([
|
|
742
|
+
h({ type: String })
|
|
743
|
+
], a.prototype, "placeholder", 2);
|
|
744
|
+
l([
|
|
745
|
+
h({ type: Array })
|
|
746
|
+
], a.prototype, "proximity", 2);
|
|
747
|
+
l([
|
|
748
|
+
h({ type: Boolean })
|
|
749
|
+
], a.prototype, "reverseActive", 2);
|
|
750
|
+
l([
|
|
751
|
+
h({ type: String })
|
|
752
|
+
], a.prototype, "reverseButtonTitle", 2);
|
|
753
|
+
l([
|
|
754
|
+
h({ type: Object })
|
|
755
|
+
], a.prototype, "reverseGeocodingExcludeTypes", 2);
|
|
756
|
+
l([
|
|
757
|
+
h({ type: Number })
|
|
758
|
+
], a.prototype, "reverseGeocodingLimit", 2);
|
|
759
|
+
l([
|
|
760
|
+
h({ type: Array })
|
|
761
|
+
], a.prototype, "reverseGeocodingTypes", 2);
|
|
762
|
+
l([
|
|
763
|
+
h({ type: Object })
|
|
764
|
+
], a.prototype, "selectFirst", 2);
|
|
765
|
+
l([
|
|
766
|
+
h({ type: String })
|
|
767
|
+
], a.prototype, "showPlaceType", 2);
|
|
768
|
+
l([
|
|
769
|
+
h({ type: Object })
|
|
770
|
+
], a.prototype, "showResultsWhileTyping", 2);
|
|
771
|
+
l([
|
|
772
|
+
h({ type: Array })
|
|
773
|
+
], a.prototype, "types", 2);
|
|
774
|
+
l([
|
|
775
|
+
h({ type: String })
|
|
776
|
+
], a.prototype, "worldview", 2);
|
|
777
|
+
l([
|
|
778
|
+
Ue("input")
|
|
779
|
+
], a.prototype, "input", 2);
|
|
780
|
+
l([
|
|
781
|
+
b()
|
|
782
|
+
], a.prototype, "searchValue", 2);
|
|
783
|
+
l([
|
|
784
|
+
b()
|
|
785
|
+
], a.prototype, "listFeatures", 2);
|
|
786
|
+
l([
|
|
787
|
+
b()
|
|
788
|
+
], a.prototype, "selectedItemIndex", 2);
|
|
789
|
+
l([
|
|
790
|
+
b()
|
|
791
|
+
], a.prototype, "picked", 2);
|
|
792
|
+
l([
|
|
793
|
+
b()
|
|
794
|
+
], a.prototype, "cachedFeatures", 2);
|
|
795
|
+
l([
|
|
796
|
+
b()
|
|
797
|
+
], a.prototype, "lastSearchUrl", 2);
|
|
798
|
+
l([
|
|
799
|
+
b()
|
|
800
|
+
], a.prototype, "error", 2);
|
|
801
|
+
l([
|
|
802
|
+
b()
|
|
803
|
+
], a.prototype, "abortController", 2);
|
|
804
|
+
l([
|
|
805
|
+
b()
|
|
806
|
+
], a.prototype, "focused", 2);
|
|
807
|
+
l([
|
|
808
|
+
b()
|
|
809
|
+
], a.prototype, "focusedDelayed", 2);
|
|
810
|
+
a = l([
|
|
811
|
+
F("maptiler-geocoder")
|
|
812
|
+
], a);
|
|
813
|
+
const tt = [
|
|
814
|
+
"adjustUrl",
|
|
815
|
+
"apiKey",
|
|
816
|
+
"apiUrl",
|
|
817
|
+
"bbox",
|
|
818
|
+
"clearButtonTitle",
|
|
819
|
+
"clearListOnPick",
|
|
820
|
+
"clearOnBlur",
|
|
821
|
+
"collapsed",
|
|
822
|
+
"country",
|
|
823
|
+
"debounceSearch",
|
|
824
|
+
"enableReverse",
|
|
825
|
+
"errorMessage",
|
|
826
|
+
"excludeTypes",
|
|
827
|
+
"reverseGeocodingExcludeTypes",
|
|
828
|
+
"exhaustiveReverseGeocoding",
|
|
829
|
+
"fetchParameters",
|
|
830
|
+
"fetchFullGeometryOnPick",
|
|
831
|
+
"filter",
|
|
832
|
+
"fuzzyMatch",
|
|
833
|
+
"iconsBaseUrl",
|
|
834
|
+
"keepListOpen",
|
|
835
|
+
"language",
|
|
836
|
+
"limit",
|
|
837
|
+
"reverseGeocodingLimit",
|
|
838
|
+
"minLength",
|
|
839
|
+
"noResultsMessage",
|
|
840
|
+
"openListOnTop",
|
|
841
|
+
"placeholder",
|
|
842
|
+
"proximity",
|
|
843
|
+
"reverseActive",
|
|
844
|
+
"reverseButtonTitle",
|
|
845
|
+
"selectFirst",
|
|
846
|
+
"showPlaceType",
|
|
847
|
+
"showResultsWhileTyping",
|
|
848
|
+
"types",
|
|
849
|
+
"reverseGeocodingTypes",
|
|
850
|
+
"worldview"
|
|
851
|
+
];
|
|
852
|
+
export {
|
|
853
|
+
H as MaptilerGeocodeClearIconElement,
|
|
854
|
+
J as MaptilerGeocodeFailIconElement,
|
|
855
|
+
X as MaptilerGeocodeLoadingIconElement,
|
|
856
|
+
Y as MaptilerGeocodeReverseGeocodingIconElement,
|
|
857
|
+
ee as MaptilerGeocodeSearchIconElement,
|
|
858
|
+
a as MaptilerGeocoderElement
|
|
859
|
+
};
|
|
860
|
+
//# sourceMappingURL=index.js.map
|