File tree Expand file tree Collapse file tree 4 files changed +75
-10
lines changed
src/stories/BasicUsage/MapControls Expand file tree Collapse file tree 4 files changed +75
-10
lines changed Original file line number Diff line number Diff line change 55 "dependencies" : {
66 "azure-maps-control" : " ^3.3.0" ,
77 "react" : " ^18.2.0" ,
8- "react-azure-maps" : " ^1.0.0 " ,
8+ "react-azure-maps" : " ^1.0.2 " ,
99 "react-dom" : " ^18.2.0" ,
1010 "react-router-dom" : " ^6.3.0"
1111 },
Original file line number Diff line number Diff line change @@ -130,4 +130,50 @@ import {
130130 ]}
131131 />
132132</AzureMapsProvider>;
133+ ` } />
134+
135+ ## Scale Control
136+
137+ <MapControl controls = { [controls [6 ]]} />
138+ <Source code = { `
139+ import {
140+ ControlOptions,
141+ AzureMapsProvider,
142+ AzureMap,
143+ } from 'react-azure-maps';
144+
145+ <AzureMapsProvider>
146+ <AzureMap
147+ options={your_options}
148+ controls={[
149+ {
150+ controlName: 'ScaleControl',
151+ options: { position: 'bottom-left' } as ControlOptions,
152+ },
153+ ]}
154+ />
155+ </AzureMapsProvider>;
156+ ` } />
157+
158+ ## Fullscreen Control
159+
160+ <MapControl controls = { [controls [7 ]]} />
161+ <Source code = { `
162+ import {
163+ ControlOptions,
164+ AzureMapsProvider,
165+ AzureMap,
166+ } from 'react-azure-maps';
167+
168+ <AzureMapsProvider>
169+ <AzureMap
170+ options={your_options}
171+ controls={[
172+ {
173+ controlName: 'FullscreenControl',
174+ options: { position: 'top-right' } as ControlOptions,
175+ },
176+ ]}
177+ />
178+ </AzureMapsProvider>;
133179` } />
Original file line number Diff line number Diff line change @@ -36,6 +36,16 @@ export const controls: IAzureMapControls[] = [
3636 controlOptions : { } ,
3737 options : { position : 'bottom-left' } as ControlOptions ,
3838 } ,
39+ {
40+ controlName : 'ScaleControl' ,
41+ controlOptions : { } ,
42+ options : { position : 'bottom-left' } as ControlOptions ,
43+ } ,
44+ {
45+ controlName : 'FullscreenControl' ,
46+ controlOptions : { } ,
47+ options : { position : 'top-right' } as ControlOptions ,
48+ }
3949] ;
4050
4151const MapControl = ( { controls } : ControlProps ) => {
You can’t perform that action at this time.
0 commit comments