react-bing-map 1.0.7 → 1.0.8

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.
@@ -0,0 +1,520 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ const DEFAULT_CENTER_LOCATION$1 = [0, 0];
6
+ const DEFAULT_PUSH_PINS$1 = [];
7
+ const DEFAULT_MAP_POSITION = { north: 49.234, south: 24.175, east: -65.573, west: -125.778 };
8
+ const DEFAULT_INFO_BOX_STYLE = { maxWidth: 600, maxHeight: 450 };
9
+ const useBingMaps = ({ mapId, mapType = "", bingKey = "", centerLocation = DEFAULT_CENTER_LOCATION$1, zoom = 0, pushPins = DEFAULT_PUSH_PINS$1, pushPinIcon = "", showScalebar = true, showCopyright = true, showLogo = true, disableZooming = false, showBreadcrumb = true, showLocateMeButton = true, showZoomButtons = true, showMapTypeSelector = true, mapPosition = DEFAULT_MAP_POSITION, infoBoxStyle = DEFAULT_INFO_BOX_STYLE, source, destination, showRoute = false, routeMode = 'driving', useGPS = false, onGPSLocationFound, onGPSError, onRouteCalculated, }) => {
10
+ const myWindow = window;
11
+ const onGPSLocationFoundRef = React.useRef(onGPSLocationFound);
12
+ const onGPSErrorRef = React.useRef(onGPSError);
13
+ const onRouteCalculatedRef = React.useRef(onRouteCalculated);
14
+ React.useEffect(() => {
15
+ onGPSLocationFoundRef.current = onGPSLocationFound;
16
+ }, [onGPSLocationFound]);
17
+ React.useEffect(() => {
18
+ onGPSErrorRef.current = onGPSError;
19
+ }, [onGPSError]);
20
+ React.useEffect(() => {
21
+ onRouteCalculatedRef.current = onRouteCalculated;
22
+ }, [onRouteCalculated]);
23
+ const initMap = React.useCallback(() => {
24
+ const Maps = myWindow.Microsoft?.Maps;
25
+ if (!Maps) {
26
+ return;
27
+ }
28
+ const mapElement = document.getElementById(mapId);
29
+ if (!mapElement) {
30
+ return;
31
+ }
32
+ const center = new Maps.Location(centerLocation[0], centerLocation[1]);
33
+ const map = new Maps.Map(mapElement, {
34
+ credentials: bingKey,
35
+ center: center,
36
+ bounds: Maps.LocationRect.fromEdges(mapPosition.north, mapPosition.west, mapPosition.south, mapPosition.east),
37
+ mapTypeId: Maps.MapTypeId[mapType],
38
+ zoom: zoom,
39
+ showScalebar: showScalebar,
40
+ showCopyright: showCopyright,
41
+ showLogo: showLogo,
42
+ disableZooming: disableZooming,
43
+ showBreadcrumb: showBreadcrumb,
44
+ showLocateMeButton: showLocateMeButton,
45
+ showZoomButtons: showZoomButtons,
46
+ showMapTypeSelector: showMapTypeSelector,
47
+ });
48
+ const infoBox = new Maps.Infobox(map.getCenter(), {
49
+ visible: false,
50
+ });
51
+ infoBox.setMap(map);
52
+ addPushPins(center, infoBox, map, Maps, pushPins);
53
+ if (showRoute && source && destination && !useGPS) {
54
+ renderRoute(map, Maps, source, destination, bingKey, routeMode);
55
+ }
56
+ // Request GPS location if enabled
57
+ if (useGPS && navigator.geolocation) {
58
+ navigator.geolocation.getCurrentPosition((position) => {
59
+ const gpsLocation = {
60
+ latitude: position.coords.latitude,
61
+ longitude: position.coords.longitude,
62
+ };
63
+ console.log("GPS location found:", gpsLocation);
64
+ // Add GPS location pin
65
+ const gpsPin = new Maps.Pushpin(new Maps.Location(gpsLocation.latitude, gpsLocation.longitude), {
66
+ color: new Maps.Color(255, 0, 0, 255),
67
+ title: "Current Location (GPS)",
68
+ });
69
+ map.entities.push(gpsPin);
70
+ if (showRoute && destination) {
71
+ renderRoute(map, Maps, gpsLocation, destination, bingKey, routeMode);
72
+ }
73
+ else {
74
+ // Center map on GPS location
75
+ map.setView({
76
+ center: new Maps.Location(gpsLocation.latitude, gpsLocation.longitude),
77
+ zoom: 14,
78
+ });
79
+ }
80
+ onGPSLocationFoundRef.current?.(gpsLocation);
81
+ }, (error) => {
82
+ const errorMsg = `GPS Error: ${error.message}`;
83
+ console.error(errorMsg);
84
+ onGPSErrorRef.current?.(errorMsg);
85
+ if (showRoute && source && destination) {
86
+ renderRoute(map, Maps, source, destination, bingKey, routeMode);
87
+ }
88
+ }, { enableHighAccuracy: true, timeout: 5000, maximumAge: 0 });
89
+ }
90
+ else if (showRoute && source && destination) {
91
+ if (useGPS) {
92
+ onGPSErrorRef.current?.("GPS Error: Geolocation is not supported by this browser.");
93
+ }
94
+ renderRoute(map, Maps, source, destination, bingKey, routeMode);
95
+ }
96
+ }, [
97
+ bingKey,
98
+ centerLocation,
99
+ destination,
100
+ disableZooming,
101
+ infoBoxStyle,
102
+ mapId,
103
+ mapPosition,
104
+ mapType,
105
+ pushPinIcon,
106
+ pushPins,
107
+ routeMode,
108
+ showBreadcrumb,
109
+ showCopyright,
110
+ showLocateMeButton,
111
+ showLogo,
112
+ showMapTypeSelector,
113
+ showRoute,
114
+ showScalebar,
115
+ showZoomButtons,
116
+ source,
117
+ useGPS,
118
+ zoom,
119
+ ]);
120
+ const addPushPins = (center, infoBox, map, Maps, pushPins) => {
121
+ pushPins?.forEach((item) => {
122
+ const pin = new Maps.Pushpin(item.location, {
123
+ icon: item.icon ? item.icon : pushPinIcon,
124
+ });
125
+ const data = item.content;
126
+ handleOnInfoBox(center, data, infoBox, map, Maps, pin);
127
+ });
128
+ };
129
+ const handleOnInfoBox = (center, data, infoBox, map, Maps, pin) => {
130
+ Maps.Events.addHandler(pin, "click", (e) => {
131
+ infoBox.setOptions({
132
+ visible: true,
133
+ ...infoBoxStyle,
134
+ location: e.target.getLocation(),
135
+ title: data.title,
136
+ description: data.description,
137
+ });
138
+ });
139
+ map.entities.push(pin);
140
+ const zoomLevel = getZoomLevel(100, map.getCenter().latitude, 350, 250);
141
+ map.setView({
142
+ center: center,
143
+ zoom: zoom ? zoom : zoomLevel,
144
+ padding: 100,
145
+ strokeOpacity: 0.6,
146
+ });
147
+ };
148
+ const getZoomLevel = (radius, latitude, heightOfMapInPixels, widthOfMapInPixels) => {
149
+ const range = radius * 1.6 * 1000;
150
+ const limitBoundPixels = Math.min(heightOfMapInPixels, widthOfMapInPixels);
151
+ const zoom = Math.floor(Math.log((156543.03392 * Math.cos((latitude * Math.PI) / 180)) /
152
+ (range / limitBoundPixels)) / Math.log(2));
153
+ return zoom;
154
+ };
155
+ const calculateStraightLineDistance = (sourceLocation, destinationLocation) => {
156
+ const earthRadiusInKilometers = 6371;
157
+ const latitudeDifference = ((destinationLocation.latitude - sourceLocation.latitude) * Math.PI) / 180;
158
+ const longitudeDifference = ((destinationLocation.longitude - sourceLocation.longitude) * Math.PI) / 180;
159
+ const sourceLatitude = (sourceLocation.latitude * Math.PI) / 180;
160
+ const destinationLatitude = (destinationLocation.latitude * Math.PI) / 180;
161
+ const haversineValue = Math.sin(latitudeDifference / 2) * Math.sin(latitudeDifference / 2) +
162
+ Math.cos(sourceLatitude) *
163
+ Math.cos(destinationLatitude) *
164
+ Math.sin(longitudeDifference / 2) *
165
+ Math.sin(longitudeDifference / 2);
166
+ const angularDistance = 2 * Math.atan2(Math.sqrt(haversineValue), Math.sqrt(1 - haversineValue));
167
+ return earthRadiusInKilometers * angularDistance;
168
+ };
169
+ const renderRoute = (map, Maps, sourceLocation, destLocation, key, mode = 'driving') => {
170
+ const sourceMapLocation = new Maps.Location(sourceLocation.latitude, sourceLocation.longitude);
171
+ const destinationMapLocation = new Maps.Location(destLocation.latitude, destLocation.longitude);
172
+ // Add source pin (green) - always show
173
+ const sourcePin = new Maps.Pushpin(sourceMapLocation, {
174
+ color: new Maps.Color(255, 0, 204, 0),
175
+ title: "Source",
176
+ });
177
+ map.entities.push(sourcePin);
178
+ // Add destination pin (red) - always show
179
+ const destPin = new Maps.Pushpin(destinationMapLocation, {
180
+ color: new Maps.Color(255, 255, 0, 0),
181
+ title: "Destination",
182
+ });
183
+ map.entities.push(destPin);
184
+ const fitRouteEndpoints = () => {
185
+ const viewBoundaries = Maps.LocationRect.fromLocations([
186
+ sourceMapLocation,
187
+ destinationMapLocation,
188
+ ]);
189
+ map.setView({
190
+ bounds: viewBoundaries,
191
+ padding: 80,
192
+ });
193
+ };
194
+ const drawFallbackRoute = () => {
195
+ const fallbackLine = new Maps.Polyline([sourceMapLocation, destinationMapLocation], {
196
+ strokeColor: new Maps.Color(230, 0, 102, 204),
197
+ strokeThickness: 5,
198
+ });
199
+ map.entities.push(fallbackLine);
200
+ fitRouteEndpoints();
201
+ onRouteCalculatedRef.current?.({
202
+ source: sourceLocation,
203
+ destination: destLocation,
204
+ distance: calculateStraightLineDistance(sourceLocation, destLocation),
205
+ distanceUnit: 'kilometers',
206
+ isFallback: true,
207
+ });
208
+ };
209
+ fitRouteEndpoints();
210
+ const routeModeMap = {
211
+ driving: 'Driving',
212
+ walking: 'Walking',
213
+ transit: 'Transit',
214
+ };
215
+ const routeParams = new URLSearchParams({
216
+ 'wp.0': `${sourceLocation.latitude},${sourceLocation.longitude}`,
217
+ 'wp.1': `${destLocation.latitude},${destLocation.longitude}`,
218
+ routePathOutput: 'Points',
219
+ distanceUnit: 'km',
220
+ key,
221
+ });
222
+ const routeUrl = `https://dev.virtualearth.net/REST/v1/Routes/${routeModeMap[mode] ?? 'Driving'}?${routeParams.toString()}`;
223
+ fetch(routeUrl)
224
+ .then((response) => {
225
+ if (!response.ok) {
226
+ throw new Error(`Route request failed with status ${response.status}`);
227
+ }
228
+ return response.json();
229
+ })
230
+ .then((data) => {
231
+ const route = data.resourceSets?.[0]?.resources?.[0];
232
+ const routePathCoordinates = route?.routePath?.line?.coordinates;
233
+ if (!Array.isArray(routePathCoordinates) || routePathCoordinates.length === 0) {
234
+ throw new Error(data.errorDetails?.[0] || 'No route path returned from Bing Routes API.');
235
+ }
236
+ const routeCoordinates = routePathCoordinates.map((coordinate) => new Maps.Location(coordinate[0], coordinate[1]));
237
+ const routePolyline = new Maps.Polyline(routeCoordinates, {
238
+ strokeColor: new Maps.Color(230, 0, 102, 204),
239
+ strokeThickness: 5,
240
+ });
241
+ map.entities.push(routePolyline);
242
+ onRouteCalculatedRef.current?.({
243
+ source: sourceLocation,
244
+ destination: destLocation,
245
+ distance: Number(route.travelDistance) || calculateStraightLineDistance(sourceLocation, destLocation),
246
+ distanceUnit: 'kilometers',
247
+ duration: route.travelDuration,
248
+ isFallback: false,
249
+ });
250
+ if (route.bbox) {
251
+ map.setView({
252
+ bounds: Maps.LocationRect.fromEdges(route.bbox[0], route.bbox[1], route.bbox[2], route.bbox[3]),
253
+ padding: 80,
254
+ });
255
+ return;
256
+ }
257
+ map.setView({
258
+ bounds: Maps.LocationRect.fromLocations(routeCoordinates),
259
+ padding: 80,
260
+ });
261
+ })
262
+ .catch((error) => {
263
+ console.error('Route render error:', error);
264
+ onGPSErrorRef.current?.(`Route Error: ${error.message}`);
265
+ drawFallbackRoute();
266
+ });
267
+ };
268
+ return initMap;
269
+ };
270
+
271
+ const BING_SCRIPT_SELECTOR = 'script[data-bing="true"]';
272
+ const BING_CALLBACK = '__reactBingMapInit';
273
+ const BING_QUEUE = '__reactBingMapPendingInits';
274
+ const DEFAULT_CENTER_LOCATION = [0, 0];
275
+ const DEFAULT_PUSH_PINS = [];
276
+ const BingMaps = ({ mapType = 'grayscale', bingKey = '', centerLocation = DEFAULT_CENTER_LOCATION, language = 'en-IN', zoom = 0, pushPins = DEFAULT_PUSH_PINS, pushPinIcon = '', showScalebar = true, showCopyright = true, showLogo = true, disableZooming = false, showBreadcrumb = true, showLocateMeButton = true, showZoomButtons = true, showMapTypeSelector = true, mapPosition, infoBoxStyle, source, destination, showRoute, routeMode = 'driving', useGPS = false, onGPSLocationFound, onGPSError, onRouteCalculated, }) => {
277
+ const mapId = React.useMemo(() => `bing-map-${Math.random().toString(36).slice(2, 11)}`, []);
278
+ const mapView = {
279
+ mapType: mapType,
280
+ bingKey: bingKey,
281
+ centerLocation: centerLocation,
282
+ language: language,
283
+ zoom: zoom,
284
+ pushPins: pushPins,
285
+ pushPinIcon: pushPinIcon,
286
+ showScalebar: showScalebar,
287
+ showCopyright: showCopyright,
288
+ showLogo: showLogo,
289
+ disableZooming: disableZooming,
290
+ showBreadcrumb: showBreadcrumb,
291
+ showLocateMeButton: showLocateMeButton,
292
+ showZoomButtons: showZoomButtons,
293
+ showMapTypeSelector: showMapTypeSelector,
294
+ mapPosition: mapPosition,
295
+ infoBoxStyle: infoBoxStyle,
296
+ source: source,
297
+ destination: destination,
298
+ showRoute: showRoute,
299
+ routeMode: routeMode,
300
+ useGPS: useGPS,
301
+ onGPSLocationFound: onGPSLocationFound,
302
+ onGPSError: onGPSError,
303
+ onRouteCalculated: onRouteCalculated,
304
+ };
305
+ const initMap = useBingMaps({ ...mapView, mapId });
306
+ React.useEffect(() => {
307
+ const myWindow = window;
308
+ const pendingInits = (myWindow[BING_QUEUE] ?? []);
309
+ const runInit = () => {
310
+ initMap();
311
+ };
312
+ if (myWindow.Microsoft?.Maps) {
313
+ runInit();
314
+ return;
315
+ }
316
+ myWindow[BING_QUEUE] = [...pendingInits, runInit];
317
+ myWindow[BING_CALLBACK] = () => {
318
+ const callbacks = (myWindow[BING_QUEUE] ?? []);
319
+ callbacks.forEach((callback) => callback());
320
+ myWindow[BING_QUEUE] = [];
321
+ };
322
+ if (!document.querySelector(BING_SCRIPT_SELECTOR)) {
323
+ const scriptTag = document.createElement('script');
324
+ scriptTag.src =
325
+ `https://www.bing.com/api/maps/mapcontrol?callback=${BING_CALLBACK}&setLang=${language}`;
326
+ scriptTag.async = true;
327
+ scriptTag.dataset.bing = 'true';
328
+ document.body.appendChild(scriptTag);
329
+ }
330
+ return () => {
331
+ const callbacks = (myWindow[BING_QUEUE] ?? []);
332
+ myWindow[BING_QUEUE] = callbacks.filter((callback) => callback !== runInit);
333
+ };
334
+ }, [initMap, language]);
335
+ return (React.createElement("div", { id: mapId, style: {
336
+ position: 'absolute',
337
+ width: '100%',
338
+ height: '100%',
339
+ top: 0,
340
+ bottom: 0,
341
+ left: 0,
342
+ right: 0
343
+ } }));
344
+ };
345
+
346
+ const DEFAULT_LOCATIONS = {
347
+ delhi: { latitude: 28.7041, longitude: 77.1025 },
348
+ mumbai: { latitude: 19.076, longitude: 72.8777 },
349
+ bangalore: { latitude: 12.9716, longitude: 77.5946 },
350
+ hyderabad: { latitude: 17.385, longitude: 78.4867 },
351
+ chennai: { latitude: 13.0827, longitude: 80.2707 },
352
+ kolkata: { latitude: 22.5726, longitude: 88.3639 },
353
+ };
354
+ const CURRENT_LOCATION_SOURCE = "current-location";
355
+ const getInitialLocation = (locations, preferredKey, fallbackIndex) => locations[preferredKey] ?? Object.values(locations)[fallbackIndex] ?? Object.values(DEFAULT_LOCATIONS)[fallbackIndex];
356
+ const formatRouteDuration = (durationInSeconds) => {
357
+ if (!durationInSeconds) {
358
+ return "Not available";
359
+ }
360
+ const hours = Math.floor(durationInSeconds / 3600);
361
+ const minutes = Math.round((durationInSeconds % 3600) / 60);
362
+ if (hours === 0) {
363
+ return `${minutes} min`;
364
+ }
365
+ return `${hours} hr ${minutes} min`;
366
+ };
367
+ const getContainerDirection = (drawerPosition) => {
368
+ if (drawerPosition === "left") {
369
+ return "row-reverse";
370
+ }
371
+ if (drawerPosition === "top") {
372
+ return "column-reverse";
373
+ }
374
+ if (drawerPosition === "bottom") {
375
+ return "column";
376
+ }
377
+ return "row";
378
+ };
379
+ const getDrawerStyle = (drawerPosition) => {
380
+ const isHorizontal = drawerPosition === "left" || drawerPosition === "right";
381
+ return {
382
+ width: isHorizontal ? "300px" : "100%",
383
+ maxHeight: isHorizontal ? undefined : "260px",
384
+ overflowY: "auto",
385
+ flexShrink: 0,
386
+ borderLeft: drawerPosition === "right" ? "1px solid #ccc" : undefined,
387
+ borderRight: drawerPosition === "left" ? "1px solid #ccc" : undefined,
388
+ borderTop: drawerPosition === "bottom" ? "1px solid #ccc" : undefined,
389
+ borderBottom: drawerPosition === "top" ? "1px solid #ccc" : undefined,
390
+ paddingLeft: drawerPosition === "right" ? "20px" : undefined,
391
+ paddingRight: drawerPosition === "left" ? "20px" : undefined,
392
+ paddingTop: drawerPosition === "bottom" ? "16px" : undefined,
393
+ paddingBottom: drawerPosition === "top" ? "16px" : undefined,
394
+ };
395
+ };
396
+ const RouteSelectionWithGPS = ({ bingKey = "", drawerPosition = "right", locations = DEFAULT_LOCATIONS, initialSourceKey = "delhi", initialDestinationKey = "mumbai", mapType = "grayscale", language = "en-IN", zoom = 5, disableZooming = false, showScalebar = true, showCopyright = true, showLogo = true, showBreadcrumb = true, showLocateMeButton = true, showZoomButtons = true, showMapTypeSelector = true, }) => {
397
+ const [source, setSource] = React.useState(() => getInitialLocation(locations, initialSourceKey, 0));
398
+ const [destination, setDestination] = React.useState(() => getInitialLocation(locations, initialDestinationKey, 1));
399
+ const [routeMode, setRouteMode] = React.useState("driving");
400
+ const [useGPS, setUseGPS] = React.useState(false);
401
+ const [gpsLocation, setGpsLocation] = React.useState(null);
402
+ const [gpsError, setGpsError] = React.useState(null);
403
+ const [gpsStatus, setGpsStatus] = React.useState("idle");
404
+ const [routeInfo, setRouteInfo] = React.useState(null);
405
+ const resetGPSState = (enabled) => {
406
+ setUseGPS(enabled);
407
+ setGpsLocation(null);
408
+ setGpsError(null);
409
+ setGpsStatus(enabled ? "locating" : "idle");
410
+ setRouteInfo(null);
411
+ };
412
+ const selectedSourceKey = Object.keys(locations).find((key) => locations[key].latitude === source.latitude) || "";
413
+ const selectedDestinationKey = Object.keys(locations).find((key) => locations[key].latitude === destination.latitude) || "";
414
+ return (React.createElement("div", { style: {
415
+ display: "flex",
416
+ flexDirection: getContainerDirection(drawerPosition),
417
+ height: "100vh",
418
+ gap: "20px",
419
+ padding: "20px",
420
+ } },
421
+ React.createElement("div", { style: { flex: 1, minHeight: drawerPosition === "top" || drawerPosition === "bottom" ? "420px" : undefined, position: "relative", overflow: "hidden" } }, !bingKey ? (React.createElement("div", { style: { padding: "20px", backgroundColor: "#fff3cd", borderRadius: "4px", border: "1px solid #ffc107" } },
422
+ React.createElement("h3", null, "\u26A0\uFE0F API Key Required"),
423
+ React.createElement("p", null,
424
+ "Set the ",
425
+ React.createElement("code", null, "bingKey"),
426
+ " prop/control to test maps, routes, GPS, and distance."))) : (React.createElement(BingMaps, { mapType: mapType, bingKey: bingKey, language: language, zoom: zoom, disableZooming: disableZooming, source: source, destination: destination, showRoute: true, routeMode: routeMode, useGPS: useGPS, showScalebar: showScalebar, showCopyright: showCopyright, showLogo: showLogo, showBreadcrumb: showBreadcrumb, showLocateMeButton: showLocateMeButton, showZoomButtons: showZoomButtons, showMapTypeSelector: showMapTypeSelector, onGPSLocationFound: (location) => {
427
+ setGpsLocation(location);
428
+ setGpsError(null);
429
+ setGpsStatus("found");
430
+ }, onGPSError: (error) => {
431
+ setGpsError(error);
432
+ setGpsStatus("error");
433
+ }, onRouteCalculated: (calculatedRouteInfo) => {
434
+ setRouteInfo(calculatedRouteInfo);
435
+ } }))),
436
+ React.createElement("div", { style: getDrawerStyle(drawerPosition) },
437
+ React.createElement("h2", null, "Route Configuration"),
438
+ React.createElement("div", { style: { marginBottom: "20px" } },
439
+ React.createElement("label", { style: { display: "block", marginBottom: "8px", fontWeight: "bold" } }, "Source Location:"),
440
+ React.createElement("select", { value: useGPS ? CURRENT_LOCATION_SOURCE : selectedSourceKey, onChange: (event) => {
441
+ if (event.target.value === CURRENT_LOCATION_SOURCE) {
442
+ resetGPSState(true);
443
+ return;
444
+ }
445
+ setSource(locations[event.target.value]);
446
+ resetGPSState(false);
447
+ }, style: { width: "100%", padding: "8px", borderRadius: "4px", border: "1px solid #ddd" } },
448
+ React.createElement("option", { value: CURRENT_LOCATION_SOURCE }, "\uD83D\uDCCD Current Location"),
449
+ Object.entries(locations).map(([name]) => (React.createElement("option", { key: name, value: name }, name.charAt(0).toUpperCase() + name.slice(1)))))),
450
+ React.createElement("div", { style: { marginBottom: "20px" } },
451
+ React.createElement("label", { style: { display: "block", marginBottom: "8px", fontWeight: "bold" } }, "Destination Location:"),
452
+ React.createElement("select", { value: selectedDestinationKey, onChange: (event) => {
453
+ setDestination(locations[event.target.value]);
454
+ setRouteInfo(null);
455
+ }, style: { width: "100%", padding: "8px", borderRadius: "4px", border: "1px solid #ddd" } }, Object.entries(locations).map(([name]) => (React.createElement("option", { key: name, value: name }, name.charAt(0).toUpperCase() + name.slice(1)))))),
456
+ React.createElement("div", { style: { marginBottom: "20px" } },
457
+ React.createElement("label", { style: { display: "block", marginBottom: "8px", fontWeight: "bold" } }, "Route Mode:"),
458
+ React.createElement("select", { value: routeMode, onChange: (event) => {
459
+ setRouteMode(event.target.value);
460
+ setRouteInfo(null);
461
+ }, style: { width: "100%", padding: "8px", borderRadius: "4px", border: "1px solid #ddd" } },
462
+ React.createElement("option", { value: "driving" }, "\uD83D\uDE97 Driving"),
463
+ React.createElement("option", { value: "walking" }, "\uD83D\uDEB6 Walking"),
464
+ React.createElement("option", { value: "transit" }, "\uD83D\uDE8C Transit"))),
465
+ React.createElement("div", { style: { marginBottom: "20px", padding: "12px", backgroundColor: "#f0f0f0", borderRadius: "4px" } },
466
+ React.createElement("label", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" } },
467
+ React.createElement("input", { type: "checkbox", checked: useGPS, onChange: (event) => resetGPSState(event.target.checked) }),
468
+ React.createElement("span", { style: { fontWeight: "bold" } }, "Use GPS Location")),
469
+ React.createElement("p", { style: { fontSize: "12px", color: "#666", marginTop: "8px" } }, "Enable to show your current location and calculate routes from GPS."),
470
+ useGPS && gpsStatus === "locating" && (React.createElement("p", { style: { fontSize: "12px", color: "#0056b3", margin: "8px 0 0" } }, "Locating your device... allow location permission in the browser."))),
471
+ gpsLocation && (React.createElement("div", { style: { padding: "12px", backgroundColor: "#d4edda", borderRadius: "4px", marginBottom: "20px" } },
472
+ React.createElement("h4", { style: { marginTop: 0, color: "#155724" } }, "\uD83D\uDCCD GPS Location"),
473
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
474
+ React.createElement("strong", null, "Latitude:"),
475
+ " ",
476
+ gpsLocation.latitude.toFixed(4)),
477
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
478
+ React.createElement("strong", null, "Longitude:"),
479
+ " ",
480
+ gpsLocation.longitude.toFixed(4)))),
481
+ gpsError && (React.createElement("div", { style: { padding: "12px", backgroundColor: "#f8d7da", borderRadius: "4px", marginBottom: "20px" } },
482
+ React.createElement("h4", { style: { marginTop: 0, color: "#721c24" } }, "\u26A0\uFE0F GPS/Route Error"),
483
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px", color: "#721c24" } }, gpsError))),
484
+ React.createElement("div", { style: { padding: "12px", backgroundColor: "#e7f3ff", borderRadius: "4px" } },
485
+ React.createElement("h4", { style: { marginTop: 0 } }, "\uD83D\uDCCD Current Route"),
486
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
487
+ React.createElement("strong", null, "From:"),
488
+ " ",
489
+ useGPS
490
+ ? gpsLocation
491
+ ? `DEVICE GPS (${gpsLocation.latitude.toFixed(4)}, ${gpsLocation.longitude.toFixed(4)})`
492
+ : "DEVICE GPS"
493
+ : selectedSourceKey.toUpperCase()),
494
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
495
+ React.createElement("strong", null, "To:"),
496
+ " ",
497
+ selectedDestinationKey.toUpperCase()),
498
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
499
+ React.createElement("strong", null, "Mode:"),
500
+ " ",
501
+ routeMode.toUpperCase()),
502
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
503
+ React.createElement("strong", null, "Distance:"),
504
+ " ",
505
+ routeInfo
506
+ ? `${routeInfo.distance.toFixed(2)} km${routeInfo.isFallback ? " (straight line)" : ""}`
507
+ : "Calculating..."),
508
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
509
+ React.createElement("strong", null, "Duration:"),
510
+ " ",
511
+ routeInfo ? formatRouteDuration(routeInfo.duration) : "Calculating..."),
512
+ React.createElement("p", { style: { margin: "8px 0", fontSize: "14px" } },
513
+ React.createElement("strong", null, "Drawer:"),
514
+ " ",
515
+ drawerPosition.toUpperCase())))));
516
+ };
517
+
518
+ exports.BingMaps = BingMaps;
519
+ exports.RouteSelectionWithGPS = RouteSelectionWithGPS;
520
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../src/hooks/useBingMaps.ts","../../src/components/MapView/BingMaps.tsx","../../src/components/RouteSelectionWithGPS.tsx"],"sourcesContent":[null,null,null],"names":["DEFAULT_CENTER_LOCATION","DEFAULT_PUSH_PINS","useRef","useEffect","useCallback","useMemo","useState"],"mappings":";;;;AAGA,MAAMA,yBAAuB,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;AACxD,MAAMC,mBAAiB,GAAe,EAAE;AACxC,MAAM,oBAAoB,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC5F,MAAM,sBAAsB,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE;AAEhE,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,EAAE,EACZ,cAAc,GAAGD,yBAAuB,EACxC,IAAI,GAAG,CAAC,EACR,QAAQ,GAAGC,mBAAiB,EAC5B,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,IAAI,EACnB,aAAa,GAAG,IAAI,EACpB,QAAQ,GAAG,IAAI,EACf,cAAc,GAAG,KAAK,EACtB,cAAc,GAAG,IAAI,EACrB,kBAAkB,GAAG,IAAI,EACzB,eAAe,GAAG,IAAI,EACtB,mBAAmB,GAAG,IAAI,EAC1B,WAAW,GAAG,oBAAoB,EAClC,YAAY,GAAG,sBAAsB,EACrC,MAAM,EACN,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,SAAuB,EACnC,MAAM,GAAG,KAAK,EACd,kBAAkB,EAClB,UAAU,EACV,iBAAiB,GACY,KAAkB;IAC/C,MAAM,QAAQ,GAAG,MAAa;AAC9B,IAAA,MAAM,qBAAqB,GAAGC,YA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CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAChG;gBACJ,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAG,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAA;oBAAE,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAA,EAAA,SAAA,CAAwB;;oBAAE,cAAc,CAAC,WAAW,EAAE,CAAK,CACxG,CACF,CACF;AAEV;;;;;"}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TMapView } from '../../type/component.type';
3
+ export declare const BingMaps: FC<TMapView>;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { TLocation } from "../type/component.type";
3
+ export type TDrawerPosition = "left" | "right" | "top" | "bottom";
4
+ export type TRouteSelectionWithGPSProps = {
5
+ bingKey?: string;
6
+ drawerPosition?: TDrawerPosition;
7
+ locations?: Record<string, TLocation>;
8
+ initialSourceKey?: string;
9
+ initialDestinationKey?: string;
10
+ mapType?: string;
11
+ language?: string;
12
+ zoom?: number;
13
+ disableZooming?: boolean;
14
+ showScalebar?: boolean;
15
+ showCopyright?: boolean;
16
+ showLogo?: boolean;
17
+ showBreadcrumb?: boolean;
18
+ showLocateMeButton?: boolean;
19
+ showZoomButtons?: boolean;
20
+ showMapTypeSelector?: boolean;
21
+ };
22
+ export declare const RouteSelectionWithGPS: React.FC<TRouteSelectionWithGPSProps>;
@@ -0,0 +1,3 @@
1
+ export { BingMaps } from './MapView/BingMaps';
2
+ export { RouteSelectionWithGPS } from './RouteSelectionWithGPS';
3
+ export type { TDrawerPosition, TRouteSelectionWithGPSProps } from './RouteSelectionWithGPS';
@@ -0,0 +1,5 @@
1
+ import { TMapView } from "../type/component.type";
2
+ declare const useBingMaps: ({ mapId, mapType, bingKey, centerLocation, zoom, pushPins, pushPinIcon, showScalebar, showCopyright, showLogo, disableZooming, showBreadcrumb, showLocateMeButton, showZoomButtons, showMapTypeSelector, mapPosition, infoBoxStyle, source, destination, showRoute, routeMode, useGPS, onGPSLocationFound, onGPSError, onRouteCalculated, }: TMapView & {
3
+ mapId: string;
4
+ }) => (() => void);
5
+ export default useBingMaps;
@@ -0,0 +1 @@
1
+ export * from './components';