Skip to content

Commit

Permalink
added param to OpenStreetMapProvider to limit search to USA
Browse files Browse the repository at this point in the history
  • Loading branch information
mmt456 committed Aug 13, 2024
1 parent aef0110 commit 206a953
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vis/MeasurementMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ const MeasurementMap = ({
setLLayer(L.layerGroup().addTo(_map));

const search = new (GeoSearchControl as any)({
provider: new OpenStreetMapProvider(),
provider: new OpenStreetMapProvider({
params: {
countrycodes: 'us', // limit to USA
},
}),
style: 'bar', // optional: bar|button - default button
});
_map.addControl(search);
Expand Down

0 comments on commit 206a953

Please sign in to comment.