Skip to content

Commit

Permalink
Use country-coder in v3-exclusive code (re: #6941)
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Nov 1, 2019
1 parent 87bc99d commit bd52e0f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/ui/preset_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,15 @@ export function uiPresetBrowser(context, allowedGeometry, onChoose, onCancel) {


function reloadCountryCode() {
if (!services.geocoder) return;
if (!services.countryCoder) return;

var center = context.map().center();
services.geocoder.countryCode(center, function countryCallback(err, countryCode) {
if (_countryCode !== countryCode) {
_countryCode = countryCode;
updateResultsList();
}
});
var countryCode = services.countryCoder.iso1A2Code(center);
if (countryCode) countryCode = countryCode.toLowerCase();
if (_countryCode !== countryCode) {
_countryCode = countryCode;
updateResultsList();
}
}

function getRawResults() {
Expand Down

0 comments on commit bd52e0f

Please sign in to comment.