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: src/stories/BasicUsage/MapRef/MapRef.mdx
+15-8
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,19 @@ Remember to wrap your component with AzureMapsProvider to provide the necessary
33
33
import { AzureMapsProvider } from 'react-azure-maps';
34
34
import YourComponent from './YourComponent';
35
35
36
-
<AzureMapsProvider>
37
-
<YourComponent/>
38
-
</AzureMapsProvider>
36
+
const NewComponent = () => {
37
+
return(
38
+
<AzureMapsProvider>
39
+
<YourComponent/>
40
+
</AzureMapsProvider>
41
+
);
42
+
}
39
43
`}/>
40
44
41
45
## Examples
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!
48
+
42
49
In the first example, we use the `setCamera()` function to change the center of the map. <br/>
Copy file name to clipboardexpand all lines: src/stories/BasicUsage/MapStyles/MapStyles.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -26,5 +26,5 @@ const Your_Component = () => {
26
26
};
27
27
`}/>
28
28
29
-
The props shown in the example above are all set to `true` by default.
29
+
The props shown in the example above are all set to `true` by default.<br/>
30
30
For more available properties, see the documentation for [StyleOptions](https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.styleoptions?view=azure-maps-typescript-latest).
0 commit comments