@zurigo/maps 1.0.1 → 1.0.3
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/dist/components/google-maps.d.ts +3 -1
- package/dist/components/google-maps.d.ts.map +1 -1
- package/dist/components/google-maps.js +108 -162
- package/dist/components/google-maps.js.map +1 -1
- package/dist/lib/google-maps/config.d.ts +34 -31
- package/dist/lib/google-maps/config.d.ts.map +1 -1
- package/dist/lib/google-maps/config.js +54 -21
- package/dist/lib/google-maps/config.js.map +1 -1
- package/dist/lib/google-maps/geocoding-service.d.ts +3 -2
- package/dist/lib/google-maps/geocoding-service.d.ts.map +1 -1
- package/dist/lib/google-maps/geocoding-service.js +31 -38
- package/dist/lib/google-maps/geocoding-service.js.map +1 -1
- package/dist/lib/google-maps/hooks.d.ts +2 -2
- package/dist/lib/google-maps/hooks.d.ts.map +1 -1
- package/dist/lib/google-maps/hooks.js +29 -20
- package/dist/lib/google-maps/hooks.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
"use client";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.geocodingService = exports.GeocodingService = void 0;
|
|
5
5
|
const config_1 = require("./config");
|
|
@@ -10,7 +10,7 @@ class GeocodingService {
|
|
|
10
10
|
this.geocoder = null;
|
|
11
11
|
this.cache = new Map();
|
|
12
12
|
this.cacheTTL = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
|
|
13
|
-
if (typeof window !==
|
|
13
|
+
if (typeof window !== "undefined" && ((_a = window.google) === null || _a === void 0 ? void 0 : _a.maps)) {
|
|
14
14
|
this.geocoder = new google.maps.Geocoder();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -20,7 +20,7 @@ class GeocodingService {
|
|
|
20
20
|
this.geocoder = new google.maps.Geocoder();
|
|
21
21
|
}
|
|
22
22
|
if (!this.geocoder) {
|
|
23
|
-
throw new Error(
|
|
23
|
+
throw new Error("Google Maps Geocoder not available");
|
|
24
24
|
}
|
|
25
25
|
return this.geocoder;
|
|
26
26
|
}
|
|
@@ -50,32 +50,32 @@ class GeocodingService {
|
|
|
50
50
|
convertGeocoderError(status) {
|
|
51
51
|
const errorMap = {
|
|
52
52
|
[google.maps.GeocoderStatus.ZERO_RESULTS]: {
|
|
53
|
-
code:
|
|
54
|
-
message:
|
|
53
|
+
code: "ZERO_RESULTS",
|
|
54
|
+
message: "No matching address results found",
|
|
55
55
|
},
|
|
56
56
|
[google.maps.GeocoderStatus.OVER_QUERY_LIMIT]: {
|
|
57
|
-
code:
|
|
58
|
-
message:
|
|
57
|
+
code: "OVER_QUERY_LIMIT",
|
|
58
|
+
message: "Query limit exceeded, please try again later",
|
|
59
59
|
},
|
|
60
60
|
[google.maps.GeocoderStatus.REQUEST_DENIED]: {
|
|
61
|
-
code:
|
|
62
|
-
message:
|
|
61
|
+
code: "REQUEST_DENIED",
|
|
62
|
+
message: "Request denied, please check API key configuration",
|
|
63
63
|
},
|
|
64
64
|
[google.maps.GeocoderStatus.INVALID_REQUEST]: {
|
|
65
|
-
code:
|
|
66
|
-
message:
|
|
65
|
+
code: "INVALID_REQUEST",
|
|
66
|
+
message: "Invalid request format",
|
|
67
67
|
},
|
|
68
68
|
[google.maps.GeocoderStatus.UNKNOWN_ERROR]: {
|
|
69
|
-
code:
|
|
70
|
-
message:
|
|
69
|
+
code: "UNKNOWN_ERROR",
|
|
70
|
+
message: "Unknown error occurred, please try again",
|
|
71
71
|
},
|
|
72
72
|
[google.maps.GeocoderStatus.ERROR]: {
|
|
73
|
-
code:
|
|
74
|
-
message:
|
|
73
|
+
code: "UNKNOWN_ERROR",
|
|
74
|
+
message: "Server error, please try again",
|
|
75
75
|
},
|
|
76
76
|
[google.maps.GeocoderStatus.OK]: {
|
|
77
|
-
code:
|
|
78
|
-
message:
|
|
77
|
+
code: "UNKNOWN_ERROR",
|
|
78
|
+
message: "Success",
|
|
79
79
|
},
|
|
80
80
|
};
|
|
81
81
|
const error = errorMap[status] || errorMap[google.maps.GeocoderStatus.UNKNOWN_ERROR];
|
|
@@ -83,12 +83,14 @@ class GeocodingService {
|
|
|
83
83
|
}
|
|
84
84
|
async geocodeAddress(address, options = {}) {
|
|
85
85
|
if (!(0, config_1.validateApiKey)()) {
|
|
86
|
-
throw new Error(
|
|
86
|
+
throw new Error("Google Maps API key is not configured");
|
|
87
87
|
}
|
|
88
88
|
if (!address || !address.trim()) {
|
|
89
|
-
throw new Error(
|
|
89
|
+
throw new Error("Address is required for geocoding");
|
|
90
90
|
}
|
|
91
|
-
const { useCache = true, region =
|
|
91
|
+
const { useCache = true, region = "korea" } = options;
|
|
92
|
+
const regionConfig = (0, config_1.getRegionConfig)(region);
|
|
93
|
+
const { region: googleRegion, language } = regionConfig.geocoding;
|
|
92
94
|
// Check cache first
|
|
93
95
|
if (useCache) {
|
|
94
96
|
const cached = this.getCachedResult(address);
|
|
@@ -98,23 +100,17 @@ class GeocodingService {
|
|
|
98
100
|
}
|
|
99
101
|
const geocoder = this.ensureGeocoder();
|
|
100
102
|
try {
|
|
103
|
+
// 주소 끝부분 괄호 제거
|
|
104
|
+
const cleanedAddress = address.trim().replace(/\s*\([^)]*\)\s*$/, "");
|
|
101
105
|
const response = await geocoder.geocode({
|
|
102
|
-
address:
|
|
103
|
-
region,
|
|
106
|
+
address: cleanedAddress,
|
|
107
|
+
region: googleRegion,
|
|
104
108
|
language,
|
|
105
109
|
});
|
|
106
110
|
if (response.results.length === 0) {
|
|
107
111
|
throw this.convertGeocoderError(google.maps.GeocoderStatus.ZERO_RESULTS);
|
|
108
112
|
}
|
|
109
|
-
|
|
110
|
-
const filteredResults = response.results.filter((result) => {
|
|
111
|
-
const location = result.geometry.location;
|
|
112
|
-
return (0, utils_1.isWithinChinaBounds)(location.lat(), location.lng());
|
|
113
|
-
});
|
|
114
|
-
if (filteredResults.length === 0) {
|
|
115
|
-
throw new Error('No results found within China mainland bounds');
|
|
116
|
-
}
|
|
117
|
-
const geocodeResults = filteredResults.map(utils_1.parseGoogleGeocoderResult);
|
|
113
|
+
const geocodeResults = response.results.map(utils_1.parseGoogleGeocoderResult);
|
|
118
114
|
// Cache the first result
|
|
119
115
|
if (useCache && geocodeResults.length > 0) {
|
|
120
116
|
this.setCachedResult(address, geocodeResults[0]);
|
|
@@ -130,12 +126,9 @@ class GeocodingService {
|
|
|
130
126
|
}
|
|
131
127
|
async reverseGeocode(lat, lng, options = {}) {
|
|
132
128
|
if (!(0, config_1.validateApiKey)()) {
|
|
133
|
-
throw new Error(
|
|
134
|
-
}
|
|
135
|
-
if (!(0, utils_1.isWithinChinaBounds)(lat, lng)) {
|
|
136
|
-
throw new Error('Coordinates are outside China mainland bounds');
|
|
129
|
+
throw new Error("Google Maps API key is not configured");
|
|
137
130
|
}
|
|
138
|
-
const { useCache = true, language =
|
|
131
|
+
const { useCache = true, language = "en" } = options;
|
|
139
132
|
const cacheKey = `reverse:${lat.toFixed(6)},${lng.toFixed(6)}`;
|
|
140
133
|
// Check cache first
|
|
141
134
|
if (useCache) {
|
|
@@ -181,11 +174,11 @@ class GeocodingService {
|
|
|
181
174
|
successful.push({ address, result: results[0] });
|
|
182
175
|
}
|
|
183
176
|
else {
|
|
184
|
-
failed.push({ address, error:
|
|
177
|
+
failed.push({ address, error: "No results found" });
|
|
185
178
|
}
|
|
186
179
|
}
|
|
187
180
|
catch (error) {
|
|
188
|
-
const errorMessage = error instanceof Error ? error.message :
|
|
181
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
189
182
|
failed.push({ address, error: errorMessage });
|
|
190
183
|
}
|
|
191
184
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocoding-service.js","sourceRoot":"","sources":["../../../src/lib/google-maps/geocoding-service.ts"],"names":[],"mappings":";AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"geocoding-service.js","sourceRoot":"","sources":["../../../src/lib/google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,aAAa,CAAC,CAAC,CAAC;QACtD,CAAC;QAED,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;YAC7C,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC;YAC1B,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAChC,CAAC;IAED,UAAU;QACR,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,aAAa;QACX,2DAA2D;QAC3D,8BAA8B;QAC9B,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI;YACrB,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,CAAC;SACV,CAAC;IACJ,CAAC;CACF;AAjRD,4CAiRC;AAED,8BAA8B;AACjB,QAAA,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Loader } from
|
|
2
|
-
import { type GoogleMapsLibrary } from
|
|
1
|
+
import { Loader } from "@googlemaps/js-api-loader";
|
|
2
|
+
import { type GoogleMapsLibrary } from "./config";
|
|
3
3
|
interface UseGoogleMapsOptions {
|
|
4
4
|
libraries?: GoogleMapsLibrary[];
|
|
5
5
|
onLoad?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/lib/google-maps/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"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|
"use strict";
|
|
2
|
-
|
|
2
|
+
"use client";
|
|
3
3
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
4
4
|
var t = {};
|
|
5
5
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -24,14 +24,14 @@ const initializeGlobalLoader = () => {
|
|
|
24
24
|
if (globalLoader)
|
|
25
25
|
return globalLoader;
|
|
26
26
|
if (!(0, config_1.validateApiKey)()) {
|
|
27
|
-
throw new Error(
|
|
27
|
+
throw new Error("Google Maps API key is not configured");
|
|
28
28
|
}
|
|
29
29
|
globalLoader = new js_api_loader_1.Loader({
|
|
30
30
|
apiKey: config_1.GOOGLE_MAPS_CONFIG.apiKey,
|
|
31
|
-
version:
|
|
31
|
+
version: "weekly",
|
|
32
32
|
libraries: [...config_1.GOOGLE_MAPS_CONFIG.libraries],
|
|
33
33
|
language: config_1.GOOGLE_MAPS_CONFIG.language,
|
|
34
|
-
region:
|
|
34
|
+
region: "US", // API 로더는 원래 설정 유지
|
|
35
35
|
});
|
|
36
36
|
return globalLoader;
|
|
37
37
|
};
|
|
@@ -59,7 +59,9 @@ const useGoogleMaps = (options = {}) => {
|
|
|
59
59
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
60
60
|
})
|
|
61
61
|
.catch((err) => {
|
|
62
|
-
const loadError = err instanceof Error
|
|
62
|
+
const loadError = err instanceof Error
|
|
63
|
+
? err
|
|
64
|
+
: new Error("Failed to load Google Maps");
|
|
63
65
|
setError(loadError);
|
|
64
66
|
setIsLoading(false);
|
|
65
67
|
onError === null || onError === void 0 ? void 0 : onError(loadError);
|
|
@@ -81,7 +83,9 @@ const useGoogleMaps = (options = {}) => {
|
|
|
81
83
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad();
|
|
82
84
|
})
|
|
83
85
|
.catch((err) => {
|
|
84
|
-
const loadError = err instanceof Error
|
|
86
|
+
const loadError = err instanceof Error
|
|
87
|
+
? err
|
|
88
|
+
: new Error("Failed to load Google Maps");
|
|
85
89
|
setError(loadError);
|
|
86
90
|
setIsLoading(false);
|
|
87
91
|
onError === null || onError === void 0 ? void 0 : onError(loadError);
|
|
@@ -90,7 +94,7 @@ const useGoogleMaps = (options = {}) => {
|
|
|
90
94
|
catch (err) {
|
|
91
95
|
const initError = err instanceof Error
|
|
92
96
|
? err
|
|
93
|
-
: new Error(
|
|
97
|
+
: new Error("Failed to initialize Google Maps loader");
|
|
94
98
|
setError(initError);
|
|
95
99
|
onError === null || onError === void 0 ? void 0 : onError(initError);
|
|
96
100
|
}
|
|
@@ -112,12 +116,13 @@ const useGoogleMap = (containerRef, options = {}) => {
|
|
|
112
116
|
if (!isLoaded || !containerRef.current || map)
|
|
113
117
|
return;
|
|
114
118
|
try {
|
|
115
|
-
const
|
|
119
|
+
const defaultRegionConfig = (0, config_1.getRegionConfig)("korea");
|
|
120
|
+
const googleMap = new google.maps.Map(containerRef.current, Object.assign(Object.assign({ center: defaultRegionConfig.center, zoom: defaultRegionConfig.zoom.default }, config_1.GOOGLE_MAPS_CONFIG.mapOptions), mapOptions));
|
|
116
121
|
setMap(googleMap);
|
|
117
122
|
onMapLoad === null || onMapLoad === void 0 ? void 0 : onMapLoad(googleMap);
|
|
118
123
|
}
|
|
119
124
|
catch (err) {
|
|
120
|
-
const error = err instanceof Error ? err : new Error(
|
|
125
|
+
const error = err instanceof Error ? err : new Error("Failed to create map");
|
|
121
126
|
setMapError(error);
|
|
122
127
|
onMapError === null || onMapError === void 0 ? void 0 : onMapError(error);
|
|
123
128
|
}
|
|
@@ -136,27 +141,30 @@ const useGeocode = () => {
|
|
|
136
141
|
const geocodeAddress = (0, react_1.useCallback)(async (address, options) => {
|
|
137
142
|
var _a;
|
|
138
143
|
if (!isLoaded || !((_a = window.google) === null || _a === void 0 ? void 0 : _a.maps)) {
|
|
139
|
-
throw new Error(
|
|
144
|
+
throw new Error("Google Maps not loaded");
|
|
140
145
|
}
|
|
141
146
|
if (!address.trim()) {
|
|
142
|
-
throw new Error(
|
|
147
|
+
throw new Error("Address is required");
|
|
143
148
|
}
|
|
144
149
|
setIsGeocoding(true);
|
|
145
150
|
setError(null);
|
|
146
151
|
try {
|
|
152
|
+
// 주소 끝부분 괄호 제거
|
|
153
|
+
const cleanedAddress = address.trim().replace(/\s*\([^)]*\)\s*$/, "");
|
|
147
154
|
const geocoder = new google.maps.Geocoder();
|
|
155
|
+
const defaultRegionConfig = (0, config_1.getRegionConfig)("korea");
|
|
148
156
|
const response = await geocoder.geocode({
|
|
149
|
-
address,
|
|
150
|
-
region:
|
|
151
|
-
language:
|
|
157
|
+
address: cleanedAddress,
|
|
158
|
+
region: defaultRegionConfig.geocoding.region,
|
|
159
|
+
language: defaultRegionConfig.geocoding.language,
|
|
152
160
|
});
|
|
153
161
|
if (response.results.length === 0) {
|
|
154
|
-
throw new Error(
|
|
162
|
+
throw new Error("No results found for the provided address");
|
|
155
163
|
}
|
|
156
164
|
return response.results;
|
|
157
165
|
}
|
|
158
166
|
catch (err) {
|
|
159
|
-
const error = err instanceof Error ? err : new Error(
|
|
167
|
+
const error = err instanceof Error ? err : new Error("Geocoding failed");
|
|
160
168
|
setError(error);
|
|
161
169
|
throw error;
|
|
162
170
|
}
|
|
@@ -167,23 +175,24 @@ const useGeocode = () => {
|
|
|
167
175
|
const reverseGeocode = (0, react_1.useCallback)(async (lat, lng) => {
|
|
168
176
|
var _a;
|
|
169
177
|
if (!isLoaded || !((_a = window.google) === null || _a === void 0 ? void 0 : _a.maps)) {
|
|
170
|
-
throw new Error(
|
|
178
|
+
throw new Error("Google Maps not loaded");
|
|
171
179
|
}
|
|
172
180
|
setIsGeocoding(true);
|
|
173
181
|
setError(null);
|
|
174
182
|
try {
|
|
175
183
|
const geocoder = new google.maps.Geocoder();
|
|
184
|
+
const defaultRegionConfig = (0, config_1.getRegionConfig)("korea");
|
|
176
185
|
const response = await geocoder.geocode({
|
|
177
186
|
location: { lat, lng },
|
|
178
|
-
language:
|
|
187
|
+
language: defaultRegionConfig.geocoding.language,
|
|
179
188
|
});
|
|
180
189
|
if (response.results.length === 0) {
|
|
181
|
-
throw new Error(
|
|
190
|
+
throw new Error("No results found for the provided coordinates");
|
|
182
191
|
}
|
|
183
192
|
return response.results;
|
|
184
193
|
}
|
|
185
194
|
catch (err) {
|
|
186
|
-
const error = err instanceof Error ? err : new Error(
|
|
195
|
+
const error = err instanceof Error ? err : new Error("Reverse geocoding failed");
|
|
187
196
|
setError(error);
|
|
188
197
|
throw error;
|
|
189
198
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/lib/google-maps/hooks.ts"],"names":[],"mappings":";AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/lib/google-maps/hooks.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;AAEb,6DAAmD;AACnD,iCAAiE;AACjE,qCAKkB;AAOlB,4EAA4E;AAC5E,IAAI,YAAY,GAAkB,IAAI,CAAC;AACvC,IAAI,iBAAiB,GAAkC,IAAI,CAAC;AAC5D,IAAI,cAAc,GAAG,KAAK,CAAC;AAe3B,MAAM,sBAAsB,GAAG,GAAG,EAAE;IAClC,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,IAAI,CAAC,IAAA,uBAAc,GAAE,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,YAAY,GAAG,IAAI,sBAAM,CAAC;QACxB,MAAM,EAAE,2BAAkB,CAAC,MAAM;QACjC,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE,CAAC,GAAG,2BAAkB,CAAC,SAAS,CAAC;QAC5C,QAAQ,EAAE,2BAAkB,CAAC,QAAQ;QACrC,MAAM,EAAE,IAAI,EAAE,mBAAmB;KAClC,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AA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