Skip to content

Commit ed127e5

Browse files
authored
Merge pull request #217524 from yulinscottkang/npm
Update usage for npm packages
2 parents e5e558d + 9d00c05 commit ed127e5

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

articles/azure-maps/how-to-use-indoor-module.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ To use the globally hosted Azure Content Delivery Network version of the *Azure
4444
>npm install azure-maps-indoor
4545
```
4646
47-
2. Reference the *Azure Maps Indoor* module JavaScript and Style Sheet in the `<head>` element of the HTML file:
47+
2. Import the *Azure Maps Indoor* module JavaScript and Style Sheet in a source file:
4848
49-
```html
50-
<link rel="stylesheet" href="node_modules/azure-maps-indoor/dist/atlas-indoor.min.css" type="text/css" />
51-
<script src="node_modules/azure-maps-indoor/dist/atlas-indoor.min.js"></script>
49+
```js
50+
import * as indoor from "azure-maps-indoor";
51+
import "azure-maps-indoor/dist/atlas-indoor.min.css";
5252
```
5353
5454
## Set the domain and instantiate the Map object

articles/azure-maps/how-to-use-services-module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ The Azure Maps Web SDK provides a *services module*. This module is a helper lib
2828

2929
`npm install azure-maps-rest`
3030

31-
Then, add a script reference to the `<head>` element of the file:
31+
Then, use an import declaration to add the module into a source file:
3232

33-
```html
34-
<script src="node_modules/azure-maps-rest/dist/atlas-service.min.js"></script>
33+
```js
34+
import * as service from "azure-maps-rest";
3535
```
3636

3737
1. Create an authentication pipeline. The pipeline must be created before you can initialize a service URL client endpoint. Use your own Azure Maps account key or Azure Active Directory (Azure AD) credentials to authenticate an Azure Maps Search service client. In this example, the Search service URL client will be created.

articles/azure-maps/how-to-use-spatial-io-module.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ You can load the Azure Maps spatial IO module using one of the two options:
5353
npm install azure-maps-spatial-io
5454
```
5555

56-
Then, add a reference to the JavaScript in the `<head>` element of the HTML document:
56+
Then, use an import declaration to add the module into a source file:
5757

58-
```html
59-
<script src="node_modules/azure-maps-spatial-io/dist/atlas-spatial.min.js"></script>
58+
```js
59+
import * as spatial from "azure-maps-spatial-io";
6060
```
6161

6262
## Using the Spatial IO module

articles/azure-maps/set-drawing-options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ The Azure Maps Web SDK provides a *drawing tools module*. This module makes it e
2828

2929
`npm install azure-maps-drawing-tools`
3030

31-
Then, add a reference to the JavaScript and CSS stylesheet in the `<head>` element of the file:
31+
Then, import the JavaScript and CSS stylesheet in a source file:
3232

33-
```html
34-
<link rel="stylesheet" href="node_modules/azure-maps-drawing-tools/dist/atlas-drawing.min.css" type="text/css" />
35-
<script src="node_modules/azure-maps-drawing-tools/dist/atlas-drawing.min.js"></script>
33+
```js
34+
import * as drawing from "azure-maps-drawing-tools";
35+
import "azure-maps-drawing-tools/dist/atlas-drawing.min.css";
3636
```
3737

3838
## Use the drawing manager directly

0 commit comments

Comments
 (0)