Friday 23 December 2016

javascript - Limit Nominatim results tp specific country


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?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...