In my app, the user can input the coordinates to plot a point. They can do this by right clicking the map and copying the coordinates to the clipboard and pasting into a textinput, or they can simply type them in.
I want to validate the typed in coordinates and so I created a custom validator class which extends the numeric validator and ensures that a 12 digit number is entered (6 for x and 6 for y). This works fine but I also want to ensure that the x and y entered does not go out of the bounds of the min and max exents of the currently displayed map.
I cannot work out how to get a reference to the currently displayed maps extents from my custom validator action script class. The url for the map service is dynamically passed in from .NET so is not in the config.xml. I'm sure this should be simple to do but for some reason I can't work it out. Googling around hasn't been much assistance either!
Hope someone can help!