File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 11import { IAzureMapOptions , AuthenticationType } from 'react-azure-maps' ;
22
3- // export const mapOptions: IAzureMapOptions = {
4- // authOptions: {
5- // authType: AuthenticationType.anonymous,
6- // clientId: '2a60774c-f588-423b-b004-56d213773ee6',
7- // getToken: (resolve, reject) => {
8- // fetch('https://anonymous-auth.azurewebsites.net/api/GetAccessToken-Prod')
9- // .then((result) => result.text())
10- // .then((result) => resolve(result))
11- // .catch((error) => reject(new Error(`Failed to fetch anon auth token: ${error.message}`)));
12- // },
13- // },
14- // center: [0, 0],
15- // view: 'Auto',
16- // };
17-
183export const mapOptions : IAzureMapOptions = {
194 authOptions : {
20- authType : AuthenticationType . subscriptionKey ,
21- subscriptionKey : '013GHvO6nMXUbB0yrRDmgizOaO3tRzevKMzPA6Yl4PeFMPgqFuelJQQJ99AGACrJL3JAArohAAAgAZMPQDp7' ,
5+ authType : AuthenticationType . anonymous ,
6+ clientId : '2a60774c-f588-423b-b004-56d213773ee6' ,
7+ getToken : ( resolve , reject ) => {
8+ fetch ( 'https://anonymous-auth.azurewebsites.net/api/GetAccessToken-Prod' )
9+ . then ( ( result ) => result . text ( ) )
10+ . then ( ( result ) => resolve ( result ) )
11+ . catch ( ( error ) => reject ( new Error ( `Failed to fetch anon auth token: ${ error . message } ` ) ) ) ;
12+ } ,
2213 } ,
2314 center : [ 0 , 0 ] ,
2415 view : 'Auto' ,
You can’t perform that action at this time.
0 commit comments