Added addmarker and addpolygon buttons and a state machine in the admin for switching the edit modes