Skip to content

Commit ba0d506

Browse files
committed
Minor improvements to grammar.
1 parent 6517426 commit ba0d506

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

articles/azure-maps/how-to-use-image-templates-web-sdk.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ ms.custom: codepen, devx-track-js
1414

1515
Images can be used with HTML markers and various layers within the Azure Maps web SDK:
1616

17-
- Symbol layers can render points on the map with an image icon. Symbols can also be rendered along a lines path.
18-
- Polygon layers can be rendered with a fill pattern image.
19-
- HTML markers can render points using images and other HTML elements.
17+
- Symbol layers can render points on the map with an image icon. Symbols can also be rendered along a lines path.
18+
- Polygon layers can be rendered with a fill pattern image.
19+
- HTML markers can render points using images and other HTML elements.
2020

2121
In order to ensure good performance with layers, load the images into the map image sprite resource before rendering. The [IconOptions](/javascript/api/azure-maps-control/atlas.iconoptions), of the SymbolLayer, preloads a couple of marker images in a handful of colors into the map image sprite, by default. These marker images and more are available as SVG templates. They can be used to create images with custom scales, or used as a customer primary and secondary color. In total there are 42 image templates provided: 27 symbol icons and 15 polygon fill patterns.
2222

@@ -48,7 +48,7 @@ map.imageSprite.createFromTemplate('myTemplatedIcon', 'marker-flat', 'teal', '#f
4848

4949
Once an image template is loaded into the map image sprite, it can be rendered as a symbol in a symbol layer by referencing the image resource ID in the `image` option of the `iconOptions`.
5050

51-
The following sample renders a symbol layer using the `marker-flat` image template with a teal primary color and a white secondary color.
51+
The following sample renders a symbol layer using the `marker-flat` image template with a teal primary color and a white secondary color.
5252

5353
<br/>
5454

@@ -59,9 +59,9 @@ The following sample renders a symbol layer using the `marker-flat` image templa
5959

6060
## Use an image template along a lines path
6161

62-
Once an image template is loaded into the map image sprite, it can be rendered along the path of a line by adding a LineString to a data source and using a symbol layer with a `lineSpacing`option and by referencing the ID of the image resource in the `image` option of th `iconOptions`.
62+
Once an image template is loaded into the map image sprite, it can be rendered along the path of a line by adding a LineString to a data source and using a symbol layer with a `lineSpacing`option and by referencing the ID of the image resource in the `image` option of th `iconOptions`.
6363

64-
The following sample renders a pink line on the map and uses a symbol layer using the `car` image template with a dodger blue primary color and a white secondary color.
64+
The following sample renders a pink line on the map and uses a symbol layer using the `car` image template with a dodger blue primary color and a white secondary color.
6565

6666
<br/>
6767

@@ -87,7 +87,7 @@ The following sample renders a polygon layer using the `dot` image template with
8787
</iframe>
8888

8989
> [!TIP]
90-
> Setting the secondary color of fill patterns makes it easier to see the underlying map will still providing the primary pattern.
90+
> Setting the secondary color of fill patterns makes it easier to see the underlying map will still providing the primary pattern.
9191
9292
## Use an image template with an HTML marker
9393

@@ -102,9 +102,9 @@ The following sample uses the `marker-arrow` template with a red primary color,
102102
(<a href='https://codepen.io/azuremaps'>@azuremaps</a>) on <a href='https://codepen.io'>CodePen</a>.
103103
</iframe>
104104

105-
106105
> [!TIP]
107106
> Image templates can be used outside of the map too. The getImageTemplate funciton returns an SVG string that has placeholders; `{color}`, `{secondaryColor}`, `{scale}`, `{text}`. Replace these placeholder values to create a valid SVG string. You can then either add the SVG string directly to the HTML DOM or convert it into a data URI and insert it into an image tag. For example:
107+
>
108108
> ```JavaScript
109109
> //Retrieve an SVG template and replace the placeholder values.
110110
> var svg = atlas.getImageTemplate('marker').replace(/{color}/, 'red').replace(/{secondaryColor}/, 'white').replace(/{text}/, '').replace(/{scale}/, 1);
@@ -356,7 +356,6 @@ This table lists all image templates currently available within the Azure Maps w
356356
:::column-end:::
357357
:::row-end:::
358358
359-
360359
**Polygon fill pattern templates**
361360
362361
:::row:::
@@ -497,7 +496,6 @@ The map preloads a set of icons into the maps image sprite using the `marker`, `
497496
| `pin-round-darkblue` | `#003963` | `#ffffff` |
498497
| `pin-round-red` | `#ef4c4c` | `#ffffff` |
499498
500-
501499
## Try it now tool
502500
503501
With the following tool, you can render the different built-in image templates in various ways and customize the primary and secondary colors and scale.
@@ -517,8 +515,7 @@ Learn more about the classes and methods used in this article:
517515
> [ImageSpriteManager](/javascript/api/azure-maps-control/atlas.imagespritemanager)
518516
519517
> [!div class="nextstepaction"]
520-
> [atlas namespace](/javascript/api/azure-maps-control/atlas#functions
521-
)
518+
> [atlas namespace](/javascript/api/azure-maps-control/atlas#functions)
522519
523520
See the following articles for more code samples where image templates can be used:
524521
@@ -532,4 +529,4 @@ See the following articles for more code samples where image templates can be us
532529
> [Add a polygon layer](map-add-shape.md)
533530
534531
> [!div class="nextstepaction"]
535-
> [Add HTML Makers](map-add-bubble-layer.md)
532+
> [Add HTML Makers](map-add-bubble-layer.md)

0 commit comments

Comments
 (0)