You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-maps/how-to-use-image-templates-web-sdk.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,24 +115,24 @@ The following sample uses the `marker-arrow` template with a red primary color,
115
115
116
116
## Create custom reusable templates
117
117
118
-
If your application uses the same icon with different icons or if you are creating a module that adds additional image templates, you can easily add and retrieve these icons from the Azure Maps web SDK. Use the following static functions on the `atlas` namespace.
118
+
If your application uses the same icon with different icons or if you're creating a module that adds more image templates, you can easily add and retrieve these icons from the Azure Maps web SDK. Use the following static functions on the `atlas` namespace.
119
119
120
-
| Name | Return Type | Description |
121
-
|-|-|-|
120
+
| Name | Return Type | Description |
121
+
|------|-------------|-------------|
122
122
| `addImageTemplate(templateName: string, template: string, override: boolean)` | | Adds a custom SVG image template to the atlas namespace. |
123
123
| `getImageTemplate(templateName: string, scale?: number)`| string | Retrieves an SVG template by name. |
124
124
| `getAllImageTemplateNames()` | string[] | Retrieves an SVG template by name. |
125
125
126
126
SVG image templates support the following placeholder values:
127
127
128
-
| Placeholder | Description |
129
-
|-|-|
130
-
| `{color}` | The primary color. |
131
-
| `{secondaryColor}` | The secondary color. |
132
-
| `{scale}` | The SVG image is converted to an png image when added to the map image sprite. This placeholder can be used to scale a template before it is converted to ensure it renders clearly. |
128
+
| Placeholder | Description |
129
+
|-------------|--------------------|
130
+
| `{color}`| The primary color. |
131
+
| `{secondaryColor}` | The secondary color. |
132
+
| `{scale}` | The SVG image is converted to an png image when added to the map image sprite. This placeholder can be used to scale a template before it's converted to ensure it renders clearly. |
133
133
| `{text}` | The location to render text when used with an HTML Marker. |
134
134
135
-
The following example shows how to take an SVG template, and add it to the Azure Maps web SDK as a reusable icon template.
135
+
The following example shows how to take an SVG template, and add it to the Azure Maps web SDK as a reusable icon template.
136
136
137
137
<br/>
138
138
@@ -481,7 +481,7 @@ This table lists all image templates currently available within the Azure Maps w
481
481
482
482
**Preloaded image icons**
483
483
484
-
The map preloads a set of icons into the maps image sprite using the `marker`, `pin`, and `pin-round` templates. These icon names and their color values are listed in the table below.
484
+
The map preloads a set of icons into the maps image sprite using the `marker`, `pin`, and `pin-round` templates. These icon names and their color values are listed in the following table.
0 commit comments