Geocoding search results to specified country(ies)

Restricting the search results to a specific country or countries is achievable through Geocoding control. By utilizing the country option in the control constructor, one can effectively search for places within the desired country or countries. For a comprehensive list of geocoding control options, refer to the Geocoding control’s reference documentation. To illustrate, consider the following example where we perform a search limited to Germany and France as the specified countries.



Learn more

Discover the process of integrating the geocoding control feature into your React (Geocoding React component) or Svelte (Geocoding Svelte component) applications. Additionally, you have the option to use the VanillaJS version to customize it for any of your applications.

Are you currently using a different map library? No worries! Learn how to incorporate the geocoding control functionality with Leaflet (Leaflet Geocoding control), OpenLayers (OpenLayers Geocoding control), or MapLibre GL JS (MapLibre GL JS Geocoding control).

Related examples

An extension of MapLibre GL JS