Hi,
i am trying to implement drop down list. the first list shows state list, second list shows district and third one shows villages.
when the user selects a state from first list box then the map should zoom to that particular state polygon. and same for other two list boxs.
i have tried but the zoom to selected does not working for me.
can anyone guide me in this.
Regards,
satya
Thanks for the code.
But I am facing a problem when state is selected then Country list is populated, again when another state is selected then country name are populated with the previous values. How to clear the dropDown before populating the values.
Thanks.
Hi priya,
Can share your code
I used the same code by you did not change any thing.
I added the following line to the queryFeatures method:
registry.byId("countyName").get('store').data = [];
Here is a working fiddle example.
Hi Priya,
You will need to set the datastore of the combobox dijit to an empty array. Ex:
countyLayer.queryFeatures(query, function(featureSet) { var countyList = []; dojo.map(featureSet.features, function(feature) { countyList.push(feature.attributes.name); }); countyList.sort(); registry.byId("countyName").get('store').data = []; arrayUtils.forEach(countyList, function(feature){ registry.byId("countyName").get('store').add({ name: feature}); }) });
Thanks Jake.
Is there any way to display the country name and add a popup window on click event to display other details about the country ?
If you don't mind combining all three boxes' functionality into a single box, you could use the Search widget.