Issue with unwanted Map focus

487
1
07-23-2013 06:50 AM
LuisGarcia2
Occasional Contributor II
We have been having an issue with an untimely focus on the map in our application. It took a lot of chasing to figure out where it was coming from. We had noticed it was happening as soon as the mouse moved over the map and we do not have any event for that implemented. We finally found it after implementing the GotFocus event of the map and stopping the execution there. In the call Stack window, we noticed that it was coming from another event in the Draw object. In the call stack window it shows as ESRI.ArcGIS.Client.Draw.Map_MouseMove... which we do not have access to... thank you very much... 🙂

We do have a draw object implemented on our map and we want it to be active on start up so our clients can use it to mark some graphics on the map. So, if the draw object is active, then the Map_MouseMove kicks in... and I guess you guys (ESRI) set the focus there somehow??  We also have a GUI where the client can activate or deactivate the  draw object if they want to pan the map. I tested by deactivating the draw object from our GUI and sure enough the map does not get focus on mouse over again.

Now, to maintain our requirement of having the draw object active on map initialization and not having focus on the map every time the mouse moves over it, what I did was to set the map Focusable property to false. It seems to work fine. But, my question (I guess to the ESRI folks), what else could be affected by setting the focusable property to false? What would be restricted? I am just trying to avoid another wild chase later on trying to figure out why something is not working as expected.

Thanks!
0 Kudos
1 Reply
LuisGarcia2
Occasional Contributor II
well, I think I just found one... if the map is not focusable then it does not zoom in/out ... anything else? Although that by itself defeats the purpose of the map if the user cannot get pretty close to an specific area.
0 Kudos