title: Can I Limit Google Maps API Autocomplete results to Ireland and Northern Ireland
body: <p>Currently I can limit the results to Ireland and UK (GB) but I need to Limit the results to just the Island of Ireland (Ireland &amp; Northern Ireland) but as Northern Ireland is part of the UK I am getting results for the entire UK using country codes ie &amp; gb</p>
  
  <p>But how would I limit this to the Country-Ireland and Region-Northern Ireland?</p>
  
  <p>Thanks for your help in advance</p>
  
  <p>var countryCodes = ['ie', 'gb'];</p>
  
  <pre><code>        function initMap() {
              var autoInputs = [];
  
              // Destroy all existing inputs and reload them.
              function autoAllInputs() {
                  autoInputs = [];
                  $.each($(".js-location-input"), function( i, input ) {
                      var ainput = new google.maps.places.Autocomplete(input);
                      ainput.setComponentRestrictions({'country': countryCodes});
                      autoInputs.push(ainput);
                  });
              }
  
              var $template = $(".js-repeat-template");
              var $container = $(".js-repeated-items");
  
              $(".js-add-repeatable").on("click", function(e) {
                  e.preventDefault();
                  $container.append($template.html());
                  autoAllInputs();
              });
  
              autoAllInputs();
  </code></pre>