docs: make code examples consistent with map examples (#315)

This commit is contained in:
Nick Silvestri
2022-02-08 09:26:47 -05:00
committed by GitHub
parent 43a1de96fb
commit f6f2aa3e20
13 changed files with 14 additions and 0 deletions

View File

@@ -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);

View File

@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -35,6 +35,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -31,6 +31,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -26,6 +26,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -37,6 +37,7 @@ import { GeoSearchControl } from 'leaflet-geosearch';
map.addControl(
new GeoSearchControl({
provider,
style: 'bar',
}),
);
```

View File

@@ -41,6 +41,7 @@ import { GeoSearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
const searchControl = new GeoSearchControl({
provider: new OpenStreetMapProvider(),
style: 'bar',
});
map.addControl(searchControl);