Code from a flex application developed for GIS project