Skip to content

Commit c5dd0aa

Browse files
authored
Map: add Azure provider in demos (#28357)
1 parent b0038cf commit c5dd0aa

File tree

32 files changed

+199
-82
lines changed

32 files changed

+199
-82
lines changed

apps/demos/Demos/Map/Markers/Angular/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<dx-map
2-
provider="bing"
2+
provider="azure"
33
[apiKey]="apiKey"
44
[zoom]="11"
55
[height]="440"

apps/demos/Demos/Map/Markers/Angular/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class AppComponent {
3434
apiKey: APIKey = {};
3535

3636
constructor(service: Service) {
37-
this.apiKey.bing = 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC';
37+
this.apiKey.azure = '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE';
3838

3939
this.customMarkerUrl = this.mapMarkerUrl = service.getMarkerUrl();
4040
this.originalMarkers = this.markers = service.getMarkers();

apps/demos/Demos/Map/Markers/Angular/app/app.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export class Marker {
1313
}
1414

1515
export type APIKey = {
16+
azure?: string;
17+
1618
bing?: string;
1719

1820
google?: string;

apps/demos/Demos/Map/Markers/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { markersData } from './data.ts';
77
const markerUrl = 'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/maps/map-marker.png';
88

99
const apiKey = {
10-
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
10+
azure: '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE',
1111
};
1212

1313
const App = () => {
@@ -36,7 +36,7 @@ const App = () => {
3636
controls={true}
3737
markerIconSrc={currentMarkerUrl}
3838
markers={currentMarkersData}
39-
provider="bing"
39+
provider="azure"
4040
apiKey={apiKey}
4141
></Map>
4242
<div className="options">

apps/demos/Demos/Map/Markers/ReactJs/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { markersData } from './data.js';
66

77
const markerUrl = 'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/maps/map-marker.png';
88
const apiKey = {
9-
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
9+
azure: '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE',
1010
};
1111
const App = () => {
1212
const [currentMarkersData, setCurrentMarkersData] = useState(markersData);
@@ -36,7 +36,7 @@ const App = () => {
3636
controls={true}
3737
markerIconSrc={currentMarkerUrl}
3838
markers={currentMarkersData}
39-
provider="bing"
39+
provider="azure"
4040
apiKey={apiKey}
4141
></Map>
4242
<div className="options">

apps/demos/Demos/Map/Markers/Vue/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
v-model:markers="markers"
88
v-model:marker-icon-src="markersIcon"
99
width="100%"
10-
provider="bing"
10+
provider="azure"
1111
:api-key="apiKey"
1212
/>
1313
<div class="options">
@@ -38,7 +38,7 @@ import { markersData } from './data.ts';
3838
const markerUrl = 'https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/maps/map-marker.png';
3939
const markersIcon = ref(markerUrl);
4040
const apiKey = {
41-
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
41+
azure: '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE',
4242
};
4343
const markers = ref(markersData);
4444
function useCustomMarkers(data) {

apps/demos/Demos/Map/Markers/jQuery/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ $(() => {
2424
];
2525

2626
const mapWidget = $('#map').dxMap({
27-
provider: 'bing',
28-
apiKey: {
29-
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
30-
},
27+
provider: 'azure',
28+
apiKey: '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE',
3129
zoom: 11,
3230
height: 440,
3331
width: '100%',

apps/demos/Demos/Map/ProvidersAndTypes/Angular/app/app.component.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@
44
[zoom]="14"
55
[height]="400"
66
width="100%"
7-
provider="bing"
7+
[provider]="mapProviders[0].key"
88
[apiKey]="apiKey"
99
[type]="mapTypes[0].key"
1010
>
1111
</dx-map>
1212

1313
<div class="options">
1414
<div class="caption">Options</div>
15+
<div class="option">
16+
<span>Map Provider</span>
17+
<dx-select-box
18+
[dataSource]="mapProviders"
19+
displayExpr="name"
20+
valueExpr="key"
21+
[inputAttr]="{ 'aria-label': 'Map Provider' }"
22+
[(value)]="map.provider"
23+
>
24+
</dx-select-box>
25+
</div>
1526
<div class="option">
1627
<span>Map Type</span>
1728
<dx-select-box

apps/demos/Demos/Map/ProvidersAndTypes/Angular/app/app.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,18 @@ if (window && window.config.packageConfigPaths) {
2525

2626
export class AppComponent {
2727
mapTypes: MapSetting[];
28+
mapProviders: MapSetting[];
2829

2930
apiKey: APIKey = {};
3031

3132
constructor(service: Service) {
3233
this.mapTypes = service.getMapTypes();
33-
this.apiKey.bing = 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC';
34+
this.mapProviders = service.getMapProviders();
35+
this.apiKey = {
36+
azure: '6N8zuPkBsnfwniNAJkldM3cUgm3lXg3y9gkIKy59benICnnepK4DJQQJ99AIACYeBjFllM6LAAAgAZMPGFXE',
37+
bing: 'Aq3LKP2BOmzWY47TZoT1YdieypN_rB6RY9FqBfx-MDCKjvvWBbT68R51xwbL-AqC',
38+
google: 'AIzaSyBIw1-l1otL9v1bY-OR4p9w21l1VLu9L2k',
39+
};
3440
}
3541
}
3642

apps/demos/Demos/Map/ProvidersAndTypes/Angular/app/app.service.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export class MapSetting {
77
}
88

99
export type APIKey = {
10+
azure?: string;
11+
1012
bing?: string;
1113

1214
google?: string;
@@ -25,9 +27,24 @@ const mapTypes: MapSetting[] = [{
2527
name: 'Hybrid Map',
2628
}];
2729

30+
const mapProviders: MapSetting[] = [{
31+
key: 'azure',
32+
name: 'Azure',
33+
}, {
34+
key: 'bing',
35+
name: 'Bing',
36+
}, {
37+
key: 'google',
38+
name: 'Google',
39+
}];
40+
2841
@Injectable()
2942
export class Service {
3043
getMapTypes(): MapSetting[] {
3144
return mapTypes;
3245
}
46+
47+
getMapProviders(): MapSetting[] {
48+
return mapProviders;
49+
}
3350
}

0 commit comments

Comments
 (0)