Skip to content

Commit 206a953

Browse files
committed
added param to OpenStreetMapProvider to limit search to USA
1 parent aef0110 commit 206a953

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vis/MeasurementMap.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ const MeasurementMap = ({
135135
setLLayer(L.layerGroup().addTo(_map));
136136

137137
const search = new (GeoSearchControl as any)({
138-
provider: new OpenStreetMapProvider(),
138+
provider: new OpenStreetMapProvider({
139+
params: {
140+
countrycodes: 'us', // limit to USA
141+
},
142+
}),
139143
style: 'bar', // optional: bar|button - default button
140144
});
141145
_map.addControl(search);

0 commit comments

Comments
 (0)