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
The React Azure Map Storybook provides a hands-on way to explore and interact with **react-azure-maps**. <br/>
4
-
With Storybook, You can try adjusting various settings and see how these components work in real-time. <br/>
5
-
This helps you understand the practical applications of the package and how to integrate Azure Maps into your React projects effectively.
3
+
The **React Azure Map Playground** utilize [Storybook](https://storybook.js.org/) to provide an interactive way to explore and experiment with the [**react-azure-maps**](https://github.com/Azure/react-azure-maps) components.<br/>
Copy file name to clipboardexpand all lines: src/stories/BasicUsage/MapRef/MapRef.mdx
+5-5
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ const YourComponent = () => {
18
18
19
19
useEffect(() => {
20
20
if (isMapReady && mapRef)
21
-
// do something with mapRef
21
+
// Do something with mapRef
22
22
}, [isMapReady]);
23
23
24
24
return (
@@ -27,7 +27,7 @@ const YourComponent = () => {
27
27
}
28
28
`}/>
29
29
30
-
Remember to wrap your component with AzureMapsProvider to provide the necessary context:
30
+
Remember to wrap your component with AzureMapsProvider to provide the necessary context.
31
31
32
32
<Sourcecode={`
33
33
import { AzureMapsProvider } from 'react-azure-maps';
@@ -44,7 +44,7 @@ const NewComponent = () => {
44
44
45
45
## Examples
46
46
Here are two examples of how to use the `mapRef` to change the map's display. <br/>
47
-
Only codes refering to the usage of `mapRef` are shown here. Don't forget to wrap your component with `AzureMapsProvider` when implementing the examples!
47
+
Only codes referring to the usage of `mapRef` are shown here. Don't forget to wrap your component with `AzureMapsProvider` when implementing the examples!
48
48
49
49
In the first example, we use the `setCamera()` function to change the center of the map. <br/>
50
50
Click the button to see the effect.
@@ -64,7 +64,7 @@ const SetCenter = () => {
64
64
// Set the map center when the map is ready or when the map center changes.
65
65
useEffect(() => {
66
66
if (isMapReady && mapRef)
67
-
// set map center
67
+
// Set map center
68
68
mapRef.setCamera({ center: mapCenter });
69
69
}, [isMapReady, mapCenter]);
70
70
@@ -107,7 +107,7 @@ const SetStyle = () => {
107
107
//Set the tile boundaries when the map is ready or when the showTileBoundaries state changes
This example shows how to enable pointbased clustering on a data source and render them differently from individual points on the map.
9
-
Clustered points have four properties;
8
+
This example shows how to enable point-based clustering on a data source and render them differently from individual points on the map.
9
+
Clustered points have four properties:
10
10
-`cluster` - A boolean value indicating that it is a cluster.
11
-
-`cluster_id` - A unique id for the cluster which can be used with the DataSource getClusterExpansionZoom, getClusterChildren, and getClusterLeaves functions.
11
+
-`cluster_id` - A unique ID for the cluster which can be used with the DataSource getClusterExpansionZoom, getClusterChildren, and getClusterLeaves functions.
12
12
-`point_count` - The number of points the cluster contains.
13
13
-`point_count_abbreviated` - A string that abbreviates the point_count value if it is long. (i.e. 4,000 becomes 4K)
14
14
@@ -34,7 +34,7 @@ const bubbleLayerOptions = {
34
34
40, //If point_count >= 750, radius is 40 pixels.
35
35
],
36
36
37
-
//Change the color of the cluster based on the value on the point_cluster property of the cluster.
37
+
//Change the color of the cluster based on the value of the point_cluster property of the cluster.
38
38
color: [
39
39
'step',
40
40
['get', 'point_count'],
@@ -45,7 +45,7 @@ const bubbleLayerOptions = {
45
45
'rgba(255,0,0,0.8)', //If the point_count >= 100, color is red.
46
46
],
47
47
strokeWidth: 0,
48
-
filter: ['has', 'point_count'], //Only rendered data points which have a point_count property, which clusters do.
48
+
filter: ['has', 'point_count'], //Only render data points which have a point_count property, which clusters do.
Copy file name to clipboardexpand all lines: src/stories/DataVisualization/HeatMapLayer/HeatMapLayer.mdx
+9-9
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import HeatMapLayer from './HeatMapLayer';
7
7
# Heat Map Layer
8
8
9
9
A heat map layer can be used to visualize the density of point data on the map.<br/>
10
-
Following code shows how to add a simple heat map layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-heat-map-layer).<br/>
10
+
The following code shows how to add a simple heat map layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-heat-map-layer).<br/>
11
11
For more available properties, see the documentation [HeatMapLayerOptions](https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.heatmaplayeroptions?view=azure-maps-typescript-latest).
12
12
13
13
<HeatMapLayerradius={10}/>
@@ -16,14 +16,14 @@ For more available properties, see the documentation [HeatMapLayerOptions](https
16
16
<AzureMapLayerProvider
17
17
type="HeatLayer"
18
18
options={{
19
-
radius={10},
20
-
opacity={1},
21
-
intensity={1},
19
+
radius: 10,
20
+
opacity: 1,
21
+
intensity: 1,
22
22
}}
23
23
/>
24
24
`}/>
25
25
26
-
## color
26
+
## Color
27
27
You can customize the color of the heat map layer by passing the `color` prop like this: <br/>
28
28
29
29
<HeatMapLayer
@@ -60,10 +60,10 @@ You can customize the color of the heat map layer by passing the `color` prop li
60
60
/>
61
61
`}/>
62
62
63
-
## weight
63
+
## Weight
64
64
Specifies how much an individual data point contributes to the heatmap. <br/>
65
-
Must be a number greater than 0. Default `1`.<br/>
66
-
In our example, we set the weight based on "mag" property of the earthquake data. <br/>
65
+
Must be a number greater than 0. Default is `1`.<br/>
66
+
In our example, we set the weight based on the "mag" property of the earthquake data. <br/>
67
67
68
68
<HeatMapLayer
69
69
radius={10}
@@ -91,7 +91,7 @@ In our example, we set the weight based on "mag" property of the earthquake data
Copy file name to clipboardexpand all lines: src/stories/DataVisualization/ImageLayer/ImageLayer.mdx
+3-3
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ import ImageLayer from './ImageLayer';
6
6
7
7
# Image Layer
8
8
9
-
You can overlay an image to a fixed set of coordinates with the Image Layer.<br/>
10
-
Following code shows how to add a simple image layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-image-layer).<br/>
9
+
You can overlay an image on a fixed set of coordinates with the Image Layer.<br/>
10
+
The following code shows how to add a simple image layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-image-layer).<br/>
11
11
For more available properties, see the documentation [ImageLayerOptions](https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.imagelayeroptions?view=azure-maps-typescript-latest).
12
12
13
-
> Note that browsers might have difficulty loading a large image. In this case, consider breaking your image up into tiles, and loading them into the map as a [TileLayer](/docs/data-visualization-tile-layer--docs).
13
+
> Note that browsers might have difficulty loading a large image. In this case, consider breaking your image up into tiles and loading them into the map as a [TileLayer](/docs/data-visualization-tile-layer--docs).
Copy file name to clipboardexpand all lines: src/stories/DataVisualization/LineLayer/LineLayer.mdx
+2-2
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ import LineLayer from './LineLayer';
8
8
9
9
A line layer can be used to render LineString and MultiLineString features as paths or routes on the map.<br/>
10
10
It can also be used to render the outline of Polygon and MultiPolygon features.<br/><br/>
11
-
Following code shows how to add a simple line layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-line-layer)<br/>
12
-
For more available properties, see the documentation [LineLayerOptions](https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.linelayeroptions?view=azure-maps-typescript-latest)
11
+
The following code shows how to add a simple line layer. A thorough tutorial can be found [here](https://learn.microsoft.com/en-us/azure/azure-maps/map-add-line-layer).<br/>
12
+
For more available properties, see the documentation [LineLayerOptions](https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.linelayeroptions?view=azure-maps-typescript-latest).
0 commit comments