mirror of
https://github.com/jlengrand/leaflet-geosearch.git
synced 2026-03-10 08:31:26 +00:00
docs: make code examples consistent with map examples (#315)
This commit is contained in:
@@ -22,6 +22,7 @@ import { SearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
|
||||
|
||||
const searchControl = new SearchControl({
|
||||
provider: new OpenStreetMapProvider(),
|
||||
style: 'bar',
|
||||
});
|
||||
|
||||
map.addControl(searchControl);
|
||||
@@ -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);
|
||||
|
||||
@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -35,6 +35,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -37,6 +37,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
|
||||
map.addControl(
|
||||
new GeoSearchControl({
|
||||
provider,
|
||||
style: 'bar',
|
||||
}),
|
||||
);
|
||||
```
|
||||
|
||||
@@ -41,6 +41,7 @@ import { GeoSearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
|
||||
|
||||
const searchControl = new GeoSearchControl({
|
||||
provider: new OpenStreetMapProvider(),
|
||||
style: 'bar',
|
||||
});
|
||||
|
||||
map.addControl(searchControl);
|
||||
|
||||
Reference in New Issue
Block a user