1

I want to limit the search in Nominatim to a specific country and was trying this code:

 mapPanel = new GeoExt.MapPanel({
    border: true,
    region: "center",
    map: map,
    zoom: 7,
    layers: [
            locationLayer = new OpenLayers.Layer.Vector("Addresses", {displayInLayerSwitcher: false,
            styleMap: new OpenLayers.StyleMap(new OpenLayers.Style({}, {rules: rules}))
                })
    ],
    tbar: [topbarItems],
     bbar: [{
        xtype: "gx_geocodercombo",
        layer: locationLayer,
        hideTrigger: true,
        emptyText: "Search address",
        zoom: 10,
        minChars: 4,
        queryDelay: 100,
        countrycodes: "de",
        srs: "EPSG:4326",
        width: 300
    }
     ]

});

The wiki has a parameter listed that goes by the name: countrycodes and later on the same page there is another one called: country_code. It doesn't matter what parameter I use in the code above, when typing in the combobox, the results are coming in from all over the world.

Can somebody here tell me on how to limit the search to a specific country?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.