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