react-bing-map 1.0.6 → 1.0.7
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/README.md +132 -8
- package/package.json +1 -5
- package/lib/cjs/components/MapView/BingMaps.d.ts +0 -3
- package/lib/cjs/components/index.d.ts +0 -1
- package/lib/cjs/hooks/useBingMaps.d.ts +0 -17
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -120
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/stories/BingMaps.stories.d.ts +0 -6
- package/lib/cjs/type/component.type.d.ts +0 -30
- package/lib/esm/components/MapView/BingMaps.d.ts +0 -3
- package/lib/esm/components/index.d.ts +0 -1
- package/lib/esm/hooks/useBingMaps.d.ts +0 -17
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -118
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/stories/BingMaps.stories.d.ts +0 -6
- package/lib/esm/type/component.type.d.ts +0 -30
package/README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
## React - Bing Map
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
## Prerequisites
|
|
5
4
|
|
|
6
5
|
To fully utilize this component, you need a Bing Maps API key, which can be obtained from the [Bing Maps Dev Center](https://www.bingmapsportal.com).
|
|
@@ -28,14 +27,16 @@ import { BingMaps } from "react-bing-map";
|
|
|
28
27
|
#### Customized Example:
|
|
29
28
|
|
|
30
29
|
```js
|
|
31
|
-
|
|
32
|
-
mapType=
|
|
33
|
-
bingKey=
|
|
30
|
+
<BingMaps
|
|
31
|
+
mapType="grayscale"
|
|
32
|
+
bingKey="key"
|
|
34
33
|
centerLocation={[28.6448, 77.216721]}
|
|
35
|
-
language=
|
|
36
|
-
zoom
|
|
37
|
-
pushPins=
|
|
38
|
-
|
|
34
|
+
language="en-IN"
|
|
35
|
+
zoom={0}
|
|
36
|
+
pushPins={[]}
|
|
37
|
+
mapPosition={ north: 49.234, south: 24.175, east: -65.573, west: -125.778 }
|
|
38
|
+
infoBoxStyle={ maxWidth: 490, maxHeight: 600 }
|
|
39
|
+
pushPinIcon=""
|
|
39
40
|
showScalebar={true}
|
|
40
41
|
showCopyright={true}
|
|
41
42
|
showLogo={true}
|
|
@@ -44,9 +45,132 @@ import { BingMaps } from "react-bing-map";
|
|
|
44
45
|
showLocateMeButton={true}
|
|
45
46
|
showZoomButtons={true}
|
|
46
47
|
showMapTypeSelector={true}
|
|
48
|
+
|
|
47
49
|
/>
|
|
48
50
|
```
|
|
49
51
|
|
|
52
|
+
##### Props Details
|
|
53
|
+
|
|
54
|
+
#### 1. mapType
|
|
55
|
+
|
|
56
|
+
Following options are available to use based on requirements
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
[
|
|
60
|
+
"aerial",
|
|
61
|
+
"canvasDark",
|
|
62
|
+
"canvasLight",
|
|
63
|
+
"birdseye",
|
|
64
|
+
"grayscale",
|
|
65
|
+
"mercator",
|
|
66
|
+
"ordnanceSurvey",
|
|
67
|
+
"road",
|
|
68
|
+
"streetside",
|
|
69
|
+
];
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### 2. bingKey
|
|
73
|
+
|
|
74
|
+
Get the keys from the Bing Maps Dev Portal and use them.
|
|
75
|
+
|
|
76
|
+
#### 3. centerLocation
|
|
77
|
+
|
|
78
|
+
It is used to set the map position at the center of the browser screen like the output image.
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
centerLocation={[28.6448, 77.216721]}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### 4. language
|
|
85
|
+
|
|
86
|
+
It is used to define the map language based on specific needs.
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
language = "en-IN";
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### 5. zoom
|
|
93
|
+
|
|
94
|
+
We can customize the zoom level of the map and support min 1 and max 19
|
|
95
|
+
|
|
96
|
+
```js
|
|
97
|
+
zoom={0}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### 6. pushPins
|
|
101
|
+
|
|
102
|
+
It is a list of array objects, and the structure should be as follows
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"icon": "",
|
|
107
|
+
"location": {
|
|
108
|
+
"latitude": 13.067439,
|
|
109
|
+
"longitude": 80.237617
|
|
110
|
+
},
|
|
111
|
+
"content": {
|
|
112
|
+
"title": "Chennai",
|
|
113
|
+
"description": `html or simple text`
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
##### 1. icon
|
|
119
|
+
|
|
120
|
+
This icon used to show the category based pushpin we can use it or else set empty sting and use the `pushPinIon`key for global icon.
|
|
121
|
+
|
|
122
|
+
The content of the description should be like the inner HTML content below
|
|
123
|
+
|
|
124
|
+
##### 2. content
|
|
125
|
+
|
|
126
|
+
The content structure looks like the one below
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
|
|
130
|
+
"content": {
|
|
131
|
+
"title": "Chennai",
|
|
132
|
+
"description": `
|
|
133
|
+
<div class="pin-detail">
|
|
134
|
+
<section>
|
|
135
|
+
<div class="name">Partner:</div>
|
|
136
|
+
<div class="value">
|
|
137
|
+
1067207 <span id="copy_42" class="copy-section"></span>
|
|
138
|
+
</div>
|
|
139
|
+
</section>
|
|
140
|
+
</div>
|
|
141
|
+
`
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
or else use this simple description
|
|
147
|
+
|
|
148
|
+
```js
|
|
149
|
+
"content": {
|
|
150
|
+
"title": "Chennai",
|
|
151
|
+
"description": "Description"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### 7. pushPinIcon
|
|
156
|
+
|
|
157
|
+
It is used for global pushpin icon
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
pushPinIcon = "url";
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### 8. mapPosition
|
|
164
|
+
|
|
165
|
+
#### 9. infoBoxStyle
|
|
166
|
+
|
|
167
|
+
It is used to customize the infoBox maxWidth and maxHeight
|
|
168
|
+
|
|
169
|
+
```js
|
|
170
|
+
infoBoxStyle={ maxWidth: 490, maxHeight: 600 }
|
|
171
|
+
```
|
|
172
|
+

|
|
173
|
+
|
|
50
174
|
#### Output:
|
|
51
175
|
|
|
52
176
|

|
package/package.json
CHANGED
|
@@ -15,11 +15,7 @@
|
|
|
15
15
|
"typescript",
|
|
16
16
|
"react"
|
|
17
17
|
],
|
|
18
|
-
"
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/kmohanraj/react-bing-maps"
|
|
21
|
-
},
|
|
22
|
-
"version": "1.0.6",
|
|
18
|
+
"version": "1.0.7",
|
|
23
19
|
"private": false,
|
|
24
20
|
"license": "MIT",
|
|
25
21
|
"main": "./lib/cjs/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BingMaps } from './MapView/BingMaps';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const useBingMaps: ({ mapType, bingKey, centerLocation, zoom, pushPins, pushPinIcon, showScalebar, showCopyright, showLogo, disableZooming, showBreadcrumb, showLocateMeButton, showZoomButtons, showMapTypeSelector }: {
|
|
2
|
-
mapType?: string | undefined;
|
|
3
|
-
bingKey?: string | undefined;
|
|
4
|
-
centerLocation?: number[] | undefined;
|
|
5
|
-
zoom?: number | undefined;
|
|
6
|
-
pushPins?: never[] | undefined;
|
|
7
|
-
pushPinIcon?: string | undefined;
|
|
8
|
-
showScalebar?: boolean | undefined;
|
|
9
|
-
showCopyright?: boolean | undefined;
|
|
10
|
-
showLogo?: boolean | undefined;
|
|
11
|
-
disableZooming?: boolean | undefined;
|
|
12
|
-
showBreadcrumb?: boolean | undefined;
|
|
13
|
-
showLocateMeButton?: boolean | undefined;
|
|
14
|
-
showZoomButtons?: boolean | undefined;
|
|
15
|
-
showMapTypeSelector?: boolean | undefined;
|
|
16
|
-
}) => [any, any];
|
|
17
|
-
export default useBingMaps;
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
package/lib/cjs/index.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
var useBingMaps = function (_a) {
|
|
6
|
-
var _b = _a.mapType, mapType = _b === void 0 ? '' : _b, _c = _a.bingKey, bingKey = _c === void 0 ? '' : _c, _d = _a.centerLocation, centerLocation = _d === void 0 ? [0, 0] : _d, _e = _a.zoom, zoom = _e === void 0 ? 0 : _e, _f = _a.pushPins, pushPins = _f === void 0 ? [] : _f; _a.pushPinIcon; var _h = _a.showScalebar, showScalebar = _h === void 0 ? true : _h, _j = _a.showCopyright, showCopyright = _j === void 0 ? true : _j, _k = _a.showLogo, showLogo = _k === void 0 ? true : _k, _l = _a.disableZooming, disableZooming = _l === void 0 ? false : _l, _m = _a.showBreadcrumb, showBreadcrumb = _m === void 0 ? true : _m, _o = _a.showLocateMeButton, showLocateMeButton = _o === void 0 ? true : _o, _p = _a.showZoomButtons, showZoomButtons = _p === void 0 ? true : _p, _q = _a.showMapTypeSelector, showMapTypeSelector = _q === void 0 ? true : _q;
|
|
7
|
-
var CONFIG = {
|
|
8
|
-
NORTH: 49.234,
|
|
9
|
-
SOUTH: 24.175,
|
|
10
|
-
EAST: -65.573,
|
|
11
|
-
WEST: -125.778,
|
|
12
|
-
ZOOM: 3
|
|
13
|
-
};
|
|
14
|
-
var myWindow = window;
|
|
15
|
-
var initMap = React.useCallback(function () {
|
|
16
|
-
var Maps = myWindow.Microsoft.Maps;
|
|
17
|
-
var center = new Maps.Location(centerLocation[0], centerLocation[1]);
|
|
18
|
-
var map = new Maps.Map('#bing-map', {
|
|
19
|
-
credentials: bingKey,
|
|
20
|
-
center: center,
|
|
21
|
-
bounds: Maps.LocationRect.fromEdges(CONFIG.NORTH, CONFIG.WEST, CONFIG.SOUTH, CONFIG.EAST),
|
|
22
|
-
mapTypeId: Maps.MapTypeId[mapType],
|
|
23
|
-
zoom: zoom,
|
|
24
|
-
showScalebar: showScalebar,
|
|
25
|
-
showCopyright: showCopyright,
|
|
26
|
-
showLogo: showLogo,
|
|
27
|
-
disableZooming: disableZooming,
|
|
28
|
-
showBreadcrumb: showBreadcrumb,
|
|
29
|
-
showLocateMeButton: showLocateMeButton,
|
|
30
|
-
showZoomButtons: showZoomButtons,
|
|
31
|
-
showMapTypeSelector: showMapTypeSelector
|
|
32
|
-
});
|
|
33
|
-
var infoBox = new Maps.Infobox(map.getCenter(), {
|
|
34
|
-
visible: false
|
|
35
|
-
});
|
|
36
|
-
infoBox.setMap(map);
|
|
37
|
-
addPushPins(center, infoBox, map, Maps, pushPins);
|
|
38
|
-
}, [pushPins]);
|
|
39
|
-
var addPushPins = function (center, infoBox, map, Maps, pushPins) {
|
|
40
|
-
pushPins.forEach(function (item) {
|
|
41
|
-
var pin = new Maps.Pushpin(item.center, null);
|
|
42
|
-
var data = item.content;
|
|
43
|
-
handleOnInfoBox(center, data, infoBox, map, Maps, pin);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var handleOnInfoBox = function (center, data, infoBox, map, Maps, pin) {
|
|
47
|
-
Maps.Events.addHandler(pin, 'click', function (e) {
|
|
48
|
-
infoBox.setOptions({
|
|
49
|
-
visible: true,
|
|
50
|
-
location: e.target.getLocation(),
|
|
51
|
-
title: data.title,
|
|
52
|
-
description: data.description.name
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
map.entities.push(pin);
|
|
56
|
-
var zoomLevel = getZoomLevel(100, map.getCenter().latitude, 350, 250);
|
|
57
|
-
map.setView({
|
|
58
|
-
center: center,
|
|
59
|
-
zoom: zoom ? zoom : zoomLevel,
|
|
60
|
-
padding: 100,
|
|
61
|
-
strokeOpacity: 0.6
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
var getZoomLevel = function (radius, latitude, heightOfMapInPixels, widthOfMapInPixels) {
|
|
65
|
-
var range = radius * 1.6 * 1000;
|
|
66
|
-
var limitBoundPixels = Math.min(heightOfMapInPixels, widthOfMapInPixels);
|
|
67
|
-
var zoom = Math.floor(Math.log((156543.03392 * Math.cos((latitude * Math.PI) / 180)) /
|
|
68
|
-
(range / limitBoundPixels)) / Math.log(2));
|
|
69
|
-
return zoom;
|
|
70
|
-
};
|
|
71
|
-
return [myWindow, initMap];
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// const logo: string = require("../assets/legend-f.svg");
|
|
75
|
-
// import * as logo from 'logo.svg'
|
|
76
|
-
// const logo = require("../../assets/legend-f.svg") as string;
|
|
77
|
-
var BingMaps = function (_a) {
|
|
78
|
-
var _b = _a.mapType, mapType = _b === void 0 ? 'grayscale' : _b, _c = _a.bingKey, bingKey = _c === void 0 ? '' : _c, _d = _a.centerLocation, centerLocation = _d === void 0 ? [0, 0] : _d, _e = _a.language, language = _e === void 0 ? 'en-IN' : _e, _f = _a.zoom, zoom = _f === void 0 ? 0 : _f, _g = _a.pushPins, pushPins = _g === void 0 ? [] : _g, _h = _a.pushPinIcon, pushPinIcon = _h === void 0 ? '' : _h, _j = _a.showScalebar, showScalebar = _j === void 0 ? true : _j, _k = _a.showCopyright, showCopyright = _k === void 0 ? true : _k, _l = _a.showLogo, showLogo = _l === void 0 ? true : _l, _m = _a.disableZooming, disableZooming = _m === void 0 ? false : _m, _o = _a.showBreadcrumb, showBreadcrumb = _o === void 0 ? true : _o, _p = _a.showLocateMeButton, showLocateMeButton = _p === void 0 ? true : _p, _q = _a.showZoomButtons, showZoomButtons = _q === void 0 ? true : _q, _r = _a.showMapTypeSelector, showMapTypeSelector = _r === void 0 ? true : _r;
|
|
79
|
-
var mapView = {
|
|
80
|
-
mapType: mapType,
|
|
81
|
-
bingKey: bingKey,
|
|
82
|
-
centerLocation: centerLocation,
|
|
83
|
-
language: language,
|
|
84
|
-
zoom: zoom,
|
|
85
|
-
pushPins: pushPins,
|
|
86
|
-
pushPinIcon: pushPinIcon,
|
|
87
|
-
showScalebar: showScalebar,
|
|
88
|
-
showCopyright: showCopyright,
|
|
89
|
-
showLogo: showLogo,
|
|
90
|
-
disableZooming: disableZooming,
|
|
91
|
-
showBreadcrumb: showBreadcrumb,
|
|
92
|
-
showLocateMeButton: showLocateMeButton,
|
|
93
|
-
showZoomButtons: showZoomButtons,
|
|
94
|
-
showMapTypeSelector: showMapTypeSelector
|
|
95
|
-
};
|
|
96
|
-
var _s = useBingMaps(mapView), myWindow = _s[0], initMap = _s[1];
|
|
97
|
-
myWindow.initMap = initMap;
|
|
98
|
-
React.useEffect(function () {
|
|
99
|
-
if (!document.querySelector('[data-bing="true"]')) {
|
|
100
|
-
var scriptTag = document.createElement('script');
|
|
101
|
-
scriptTag.src =
|
|
102
|
-
"https://www.bing.com/api/maps/mapcontrol?callback=initMap&setLang=".concat(language);
|
|
103
|
-
scriptTag.async = true;
|
|
104
|
-
scriptTag.dataset.bing = 'true';
|
|
105
|
-
document.body.appendChild(scriptTag);
|
|
106
|
-
}
|
|
107
|
-
}, [initMap]);
|
|
108
|
-
return (React.createElement("div", { id: 'bing-map', style: {
|
|
109
|
-
position: 'absolute',
|
|
110
|
-
width: '100%',
|
|
111
|
-
height: '100%',
|
|
112
|
-
top: 0,
|
|
113
|
-
bottom: 0,
|
|
114
|
-
left: 0,
|
|
115
|
-
right: 0
|
|
116
|
-
} }));
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
exports.BingMaps = BingMaps;
|
|
120
|
-
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/hooks/useBingMaps.ts","../../src/components/MapView/BingMaps.tsx"],"sourcesContent":[null,null],"names":["useCallback","useEffect"],"mappings":";;;;AAGA,IAAM,WAAW,GAAG,UAAC,EAepB,EAAA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KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,EAAE,EAAC,UAAU,EACb,KAAK,EAAE;AACL,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,GAAG,EAAE,CAAC;AACN,YAAA,MAAM,EAAE,CAAC;AACT,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,EAAA,CACD,EACF;AACJ;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type TDescription = {
|
|
2
|
-
name: string;
|
|
3
|
-
};
|
|
4
|
-
export type TContent = {
|
|
5
|
-
title: string;
|
|
6
|
-
description: TDescription;
|
|
7
|
-
};
|
|
8
|
-
export type TPushPin = {
|
|
9
|
-
icon: string;
|
|
10
|
-
center: {};
|
|
11
|
-
content: TContent;
|
|
12
|
-
};
|
|
13
|
-
export type TMapView = {
|
|
14
|
-
mapType: string;
|
|
15
|
-
bingKey: string;
|
|
16
|
-
centerLocation?: [number, number];
|
|
17
|
-
language?: string;
|
|
18
|
-
zoom?: number;
|
|
19
|
-
pushPins?: [];
|
|
20
|
-
pushPinIcon?: any;
|
|
21
|
-
showScalebar?: boolean;
|
|
22
|
-
showCopyright?: boolean;
|
|
23
|
-
showLogo?: boolean;
|
|
24
|
-
disableZooming?: boolean;
|
|
25
|
-
showBreadcrumb?: boolean;
|
|
26
|
-
showLocateMeButton: boolean;
|
|
27
|
-
showZoomButtons?: boolean;
|
|
28
|
-
showMapTypeSelector?: boolean;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BingMaps } from './MapView/BingMaps';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const useBingMaps: ({ mapType, bingKey, centerLocation, zoom, pushPins, pushPinIcon, showScalebar, showCopyright, showLogo, disableZooming, showBreadcrumb, showLocateMeButton, showZoomButtons, showMapTypeSelector }: {
|
|
2
|
-
mapType?: string | undefined;
|
|
3
|
-
bingKey?: string | undefined;
|
|
4
|
-
centerLocation?: number[] | undefined;
|
|
5
|
-
zoom?: number | undefined;
|
|
6
|
-
pushPins?: never[] | undefined;
|
|
7
|
-
pushPinIcon?: string | undefined;
|
|
8
|
-
showScalebar?: boolean | undefined;
|
|
9
|
-
showCopyright?: boolean | undefined;
|
|
10
|
-
showLogo?: boolean | undefined;
|
|
11
|
-
disableZooming?: boolean | undefined;
|
|
12
|
-
showBreadcrumb?: boolean | undefined;
|
|
13
|
-
showLocateMeButton?: boolean | undefined;
|
|
14
|
-
showZoomButtons?: boolean | undefined;
|
|
15
|
-
showMapTypeSelector?: boolean | undefined;
|
|
16
|
-
}) => [any, any];
|
|
17
|
-
export default useBingMaps;
|
package/lib/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
package/lib/esm/index.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
var useBingMaps = function (_a) {
|
|
4
|
-
var _b = _a.mapType, mapType = _b === void 0 ? '' : _b, _c = _a.bingKey, bingKey = _c === void 0 ? '' : _c, _d = _a.centerLocation, centerLocation = _d === void 0 ? [0, 0] : _d, _e = _a.zoom, zoom = _e === void 0 ? 0 : _e, _f = _a.pushPins, pushPins = _f === void 0 ? [] : _f; _a.pushPinIcon; var _h = _a.showScalebar, showScalebar = _h === void 0 ? true : _h, _j = _a.showCopyright, showCopyright = _j === void 0 ? true : _j, _k = _a.showLogo, showLogo = _k === void 0 ? true : _k, _l = _a.disableZooming, disableZooming = _l === void 0 ? false : _l, _m = _a.showBreadcrumb, showBreadcrumb = _m === void 0 ? true : _m, _o = _a.showLocateMeButton, showLocateMeButton = _o === void 0 ? true : _o, _p = _a.showZoomButtons, showZoomButtons = _p === void 0 ? true : _p, _q = _a.showMapTypeSelector, showMapTypeSelector = _q === void 0 ? true : _q;
|
|
5
|
-
var CONFIG = {
|
|
6
|
-
NORTH: 49.234,
|
|
7
|
-
SOUTH: 24.175,
|
|
8
|
-
EAST: -65.573,
|
|
9
|
-
WEST: -125.778,
|
|
10
|
-
ZOOM: 3
|
|
11
|
-
};
|
|
12
|
-
var myWindow = window;
|
|
13
|
-
var initMap = useCallback(function () {
|
|
14
|
-
var Maps = myWindow.Microsoft.Maps;
|
|
15
|
-
var center = new Maps.Location(centerLocation[0], centerLocation[1]);
|
|
16
|
-
var map = new Maps.Map('#bing-map', {
|
|
17
|
-
credentials: bingKey,
|
|
18
|
-
center: center,
|
|
19
|
-
bounds: Maps.LocationRect.fromEdges(CONFIG.NORTH, CONFIG.WEST, CONFIG.SOUTH, CONFIG.EAST),
|
|
20
|
-
mapTypeId: Maps.MapTypeId[mapType],
|
|
21
|
-
zoom: zoom,
|
|
22
|
-
showScalebar: showScalebar,
|
|
23
|
-
showCopyright: showCopyright,
|
|
24
|
-
showLogo: showLogo,
|
|
25
|
-
disableZooming: disableZooming,
|
|
26
|
-
showBreadcrumb: showBreadcrumb,
|
|
27
|
-
showLocateMeButton: showLocateMeButton,
|
|
28
|
-
showZoomButtons: showZoomButtons,
|
|
29
|
-
showMapTypeSelector: showMapTypeSelector
|
|
30
|
-
});
|
|
31
|
-
var infoBox = new Maps.Infobox(map.getCenter(), {
|
|
32
|
-
visible: false
|
|
33
|
-
});
|
|
34
|
-
infoBox.setMap(map);
|
|
35
|
-
addPushPins(center, infoBox, map, Maps, pushPins);
|
|
36
|
-
}, [pushPins]);
|
|
37
|
-
var addPushPins = function (center, infoBox, map, Maps, pushPins) {
|
|
38
|
-
pushPins.forEach(function (item) {
|
|
39
|
-
var pin = new Maps.Pushpin(item.center, null);
|
|
40
|
-
var data = item.content;
|
|
41
|
-
handleOnInfoBox(center, data, infoBox, map, Maps, pin);
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var handleOnInfoBox = function (center, data, infoBox, map, Maps, pin) {
|
|
45
|
-
Maps.Events.addHandler(pin, 'click', function (e) {
|
|
46
|
-
infoBox.setOptions({
|
|
47
|
-
visible: true,
|
|
48
|
-
location: e.target.getLocation(),
|
|
49
|
-
title: data.title,
|
|
50
|
-
description: data.description.name
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
map.entities.push(pin);
|
|
54
|
-
var zoomLevel = getZoomLevel(100, map.getCenter().latitude, 350, 250);
|
|
55
|
-
map.setView({
|
|
56
|
-
center: center,
|
|
57
|
-
zoom: zoom ? zoom : zoomLevel,
|
|
58
|
-
padding: 100,
|
|
59
|
-
strokeOpacity: 0.6
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
var getZoomLevel = function (radius, latitude, heightOfMapInPixels, widthOfMapInPixels) {
|
|
63
|
-
var range = radius * 1.6 * 1000;
|
|
64
|
-
var limitBoundPixels = Math.min(heightOfMapInPixels, widthOfMapInPixels);
|
|
65
|
-
var zoom = Math.floor(Math.log((156543.03392 * Math.cos((latitude * Math.PI) / 180)) /
|
|
66
|
-
(range / limitBoundPixels)) / Math.log(2));
|
|
67
|
-
return zoom;
|
|
68
|
-
};
|
|
69
|
-
return [myWindow, initMap];
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// const logo: string = require("../assets/legend-f.svg");
|
|
73
|
-
// import * as logo from 'logo.svg'
|
|
74
|
-
// const logo = require("../../assets/legend-f.svg") as string;
|
|
75
|
-
var BingMaps = function (_a) {
|
|
76
|
-
var _b = _a.mapType, mapType = _b === void 0 ? 'grayscale' : _b, _c = _a.bingKey, bingKey = _c === void 0 ? '' : _c, _d = _a.centerLocation, centerLocation = _d === void 0 ? [0, 0] : _d, _e = _a.language, language = _e === void 0 ? 'en-IN' : _e, _f = _a.zoom, zoom = _f === void 0 ? 0 : _f, _g = _a.pushPins, pushPins = _g === void 0 ? [] : _g, _h = _a.pushPinIcon, pushPinIcon = _h === void 0 ? '' : _h, _j = _a.showScalebar, showScalebar = _j === void 0 ? true : _j, _k = _a.showCopyright, showCopyright = _k === void 0 ? true : _k, _l = _a.showLogo, showLogo = _l === void 0 ? true : _l, _m = _a.disableZooming, disableZooming = _m === void 0 ? false : _m, _o = _a.showBreadcrumb, showBreadcrumb = _o === void 0 ? true : _o, _p = _a.showLocateMeButton, showLocateMeButton = _p === void 0 ? true : _p, _q = _a.showZoomButtons, showZoomButtons = _q === void 0 ? true : _q, _r = _a.showMapTypeSelector, showMapTypeSelector = _r === void 0 ? true : _r;
|
|
77
|
-
var mapView = {
|
|
78
|
-
mapType: mapType,
|
|
79
|
-
bingKey: bingKey,
|
|
80
|
-
centerLocation: centerLocation,
|
|
81
|
-
language: language,
|
|
82
|
-
zoom: zoom,
|
|
83
|
-
pushPins: pushPins,
|
|
84
|
-
pushPinIcon: pushPinIcon,
|
|
85
|
-
showScalebar: showScalebar,
|
|
86
|
-
showCopyright: showCopyright,
|
|
87
|
-
showLogo: showLogo,
|
|
88
|
-
disableZooming: disableZooming,
|
|
89
|
-
showBreadcrumb: showBreadcrumb,
|
|
90
|
-
showLocateMeButton: showLocateMeButton,
|
|
91
|
-
showZoomButtons: showZoomButtons,
|
|
92
|
-
showMapTypeSelector: showMapTypeSelector
|
|
93
|
-
};
|
|
94
|
-
var _s = useBingMaps(mapView), myWindow = _s[0], initMap = _s[1];
|
|
95
|
-
myWindow.initMap = initMap;
|
|
96
|
-
useEffect(function () {
|
|
97
|
-
if (!document.querySelector('[data-bing="true"]')) {
|
|
98
|
-
var scriptTag = document.createElement('script');
|
|
99
|
-
scriptTag.src =
|
|
100
|
-
"https://www.bing.com/api/maps/mapcontrol?callback=initMap&setLang=".concat(language);
|
|
101
|
-
scriptTag.async = true;
|
|
102
|
-
scriptTag.dataset.bing = 'true';
|
|
103
|
-
document.body.appendChild(scriptTag);
|
|
104
|
-
}
|
|
105
|
-
}, [initMap]);
|
|
106
|
-
return (React.createElement("div", { id: 'bing-map', style: {
|
|
107
|
-
position: 'absolute',
|
|
108
|
-
width: '100%',
|
|
109
|
-
height: '100%',
|
|
110
|
-
top: 0,
|
|
111
|
-
bottom: 0,
|
|
112
|
-
left: 0,
|
|
113
|
-
right: 0
|
|
114
|
-
} }));
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export { BingMaps };
|
|
118
|
-
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/hooks/useBingMaps.ts","../../src/components/MapView/BingMaps.tsx"],"sourcesContent":[null,null],"names":[],"mappings":";;AAGA,IAAM,WAAW,GAAG,UAAC,EAepB,EAAA;QAdC,EAAY,GAAA,EAAA,CAAA,OAAA,CAAA,CAAZ,OAAO,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,EAAE,KAAA,CACZ,CAAA,EAAA,GAAA,EAAA,CAAA,OAAY,EAAZ,OAAO,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAA,EAAA,CAAA,CACZ,sBAAuB,CAAvB,CAAA,cAAc,mBAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAA,EAAA,EACvB,EAAQ,GAAA,EAAA,CAAA,IAAA,CAAA,CAAR,IAAI,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,CAAC,KAAA,CACR,CAAA,EAAA,GAAA,EAAA,CAAA,QAAa,CAAb,CAAA,QAAQ,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,EAAE,KAAA,CACb,CAAA,EAAA,CAAA,WAAgB,MAChB,EAAmB,GAAA,EAAA,CAAA,YAAA,CAAA,CAAnB,YAAY,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,IAAI,GAAA,EAAA,CAAA,CACnB,qBAAoB,CAApB,CAAA,aAAa,mBAAG,IAAI,GAAA,EAAA,CACpB,CAAA,EAAA,GAAA,EAAA,CAAA,QAAe,CAAf,CAAA,QAAQ,mBAAG,IAAI,GAAA,EAAA,EACf,EAAsB,GAAA,EAAA,CAAA,cAAA,CAAA,CAA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AAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACnD,YAAA,SAAS,CAAC,GAAG;gBACX,oEAAqE,CAAA,MAAA,CAAA,QAAQ,CAAE,CAAC;AAClF,YAAA,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;AACvB,YAAA,SAAS,CAAC,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;AAChC,YAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACtC,SAAA;AACH,KAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAEd,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,EAAE,EAAC,UAAU,EACb,KAAK,EAAE;AACL,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,GAAG,EAAE,CAAC;AACN,YAAA,MAAM,EAAE,CAAC;AACT,YAAA,IAAI,EAAE,CAAC;AACP,YAAA,KAAK,EAAE,CAAC;AACT,SAAA,EAAA,CACD,EACF;AACJ;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
type TDescription = {
|
|
2
|
-
name: string;
|
|
3
|
-
};
|
|
4
|
-
export type TContent = {
|
|
5
|
-
title: string;
|
|
6
|
-
description: TDescription;
|
|
7
|
-
};
|
|
8
|
-
export type TPushPin = {
|
|
9
|
-
icon: string;
|
|
10
|
-
center: {};
|
|
11
|
-
content: TContent;
|
|
12
|
-
};
|
|
13
|
-
export type TMapView = {
|
|
14
|
-
mapType: string;
|
|
15
|
-
bingKey: string;
|
|
16
|
-
centerLocation?: [number, number];
|
|
17
|
-
language?: string;
|
|
18
|
-
zoom?: number;
|
|
19
|
-
pushPins?: [];
|
|
20
|
-
pushPinIcon?: any;
|
|
21
|
-
showScalebar?: boolean;
|
|
22
|
-
showCopyright?: boolean;
|
|
23
|
-
showLogo?: boolean;
|
|
24
|
-
disableZooming?: boolean;
|
|
25
|
-
showBreadcrumb?: boolean;
|
|
26
|
-
showLocateMeButton: boolean;
|
|
27
|
-
showZoomButtons?: boolean;
|
|
28
|
-
showMapTypeSelector?: boolean;
|
|
29
|
-
};
|
|
30
|
-
export {};
|