identify and remove layer

Discussion created by gzambotti on Dec 5, 2013
Hi there,

I am developing a Crossroads of Migration map (http://cga-3.hmdc.harvard.edu/migration/) that allows to pick a country
from a pull down menu and display human migration movement.

I would like to do the same enabling the click on the map (identify the name of a country) and display the migration movement, but
unfortunately the layer (feature layer) does not get remove before I click to an other country (see attached pic)[ATTACH=CONFIG]29610[/ATTACH][ATTACH=CONFIG]29610[/ATTACH].
I have tried to disable the executeIdentifyTask (dojo.disconnect(myOnClick_connect)), but it does not work properly;
any suggestion will be much appreciated.

Thank you, Giovanni