Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: make code examples consistent with map examples #315

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/leaflet-control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { SearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';

const searchControl = new SearchControl({
provider: new OpenStreetMapProvider(),
style: 'bar',
});

map.addControl(searchControl);
Expand Down Expand Up @@ -61,6 +62,7 @@ import { SearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
const searchControl = new SearchControl({
notFoundMessage: 'Sorry, that address could not be found.',
provider: new OpenStreetMapProvider(),
style: 'bar',
});

map.addControl(searchControl);
Expand Down
1 change: 1 addition & 0 deletions docs/providers/algolia.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/bing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/esri.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/geoapifr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/geocode-earth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/google.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/here.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/locationIq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/opencage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/openstreetmap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/providers/pelias.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```
Expand Down
1 change: 1 addition & 0 deletions docs/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { GeoSearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';

const searchControl = new GeoSearchControl({
provider: new OpenStreetMapProvider(),
style: 'bar',
});

map.addControl(searchControl);
Expand Down