Created a custom mapObj class that extends mapscript.