Man, sorry to hear that. Plan of action below. I know many of these things don't apply now to you, but I feel they are good things to heed for others looking to prevent such a thing, and I've got a few ideas for you to get back in the game in your town.
First, I am with Tom in CA (I think?), as I have remarked in the past- ALWAYS fly under the radar. Stay away from people in parks, and leave when it gets too crowded. Don't give them reason to complain.
Second, never ask for permission to hunt a public site unless there is a sign there that says detecting by permit only or such. If you don't ask they can't say no, and when they do you no longer have an excuse if you get caught.
Third, never approach the city UNLESS you no longer have a choice. If they have now banned detecting, then no harm in trying to talk to them and get things changed. I just think asking permission when none is expressed as needed via posted signs at a park only begs for being told no and bringing your activities to their attention. Out of sight, out of mind so to speak.
I've read of guys who pride themselves on arriving at a strange town and first thing they do is head to city hall and ask permission. That's insanity. It only asks for trouble where there wouldn't otherwise be any. Politicians hate to stick their neck out, so if you ask, chances are they'll say no just to avoid any lawsuits or such.
Even if a town has banned detecting, most cops will give a stranger a warning IMO, so long as no public sign is posted that says otherwise and you have no reason to be ignorant about it then. I find a few "Yes Sir, No Sir" type words thrown in when talking to an officer goes a long way as to how I get treated. I'm not talking about detecting here. Never been kicked out by a cop. I'm talking about a speeding ticket or such. Show respect and they will show it back.
Fourth, if somebody, Joe public or city worker or otherwise, approaches you at a park and tells you to get lost, don't argue with them. Just say you are sorry you upset them and walk away. Live to fight another day, and chances are you'll never see that person with a chip on their shoulder again at that place when you come back, especially if you now time your hunts to avoid when you saw them the first time.
Believe me, I love to argue, but I know that chances are that will only lead to a phone call to the authorities and I'll end up being told to leave. Even if there are no laws against detecting, they only want to shut up the person complaining about something, and they for sure don't want their supervisor finding out they were called to the same place twice in one day. For that reason guess who gets to leave when they sort out the situation?
Fifth, I even go so far as to keep my back to any Joe public or the road when digging, just so they can't see the "act" of it. I also always carry my digger in a holder, as holding it in your hand all the time looks intimidating to people, and I also would never dare carry a shovel at a public site, big or small. I've heard people argue that they can dig a more clean hole with a shovel. That may be true for some, but we are talking about perception here to the public's eye, and that's the whole ball of wax we are dealing with.
I've been criticized for expressing my views to "fly under the radar", and had people tell me I shouldn't be "ashamed" and stand up for my rights. Believe me, I'm the biggest voice when it comes to our rights as a "free" people these days, but I realize that the best way to when a battle is often to never have it in the first place. We simply don't have the numbers to stand up for our rights in any given town most of the time. Only take your voice to city hall when all other options are gone. That's when it's worth taking the risk. I'd say you are there now...
If I were you, I'd get a group from your area of like-minded hunters together, write up a proposal for a "free" permit to the city with a set of rules, and then ask if they'll permit it. Have it so that all who wish to get a permit have to wear a tag on their shirt that shows their name and ID #, just like a deer hunter, so they are exposed to Joe public if they are mucking things up and not filling their holes.
Also have the permit where you agree to sign it to waive the city of all responsibility should your actions result in the injury to another. If done right I think the city would agree to allowing it again under those conditions, provided they get enough of you guys showing up at town hall meetings to express how angry you are as a voter. Votes always talk in politics. The squeeky wheel gets the grease.
And another good idea would be that anybody who wants a permit to detect must show the city in person that they can dig a proper plug and repair it, and also that they have an apron to pick up any junk they dig, along with having a proper hand held digging tool and not something they are digging graves with. If you tell them you'd be willing to volunteer heading up to city hall to teach any new permit holders the required proper recovery techniques I bet that would impress the heck out of them.
Good luck...
PS- If all else fails, please don't give up this great hobby of ours. Find some farm fields you can get permission to hunt. Those will take you a life time and then some to work. Also, start knocking on doors. A simple yes/no answer is all it takes to hunt a yard. Rejection is hard to take but I promise you once you've been told "no" a few times you'll realize it's not the end of the world in terms of ego. It'll start to be as easy as hearing "hello" from people. Trust me, as a deer hunter, I had to get over my shyness in that respect real quick if I wanted to find some private land to hunt game on. It IS worth the effort to force yourself, and you'll laugh at how scared you were after you've done it a few times. Like water off a duck's back after that. How do you think car salesman make a living? You can't tell me they weren't shaking in their boots the first few times they got rejected...