A good approach might be to calculate a value at the client side (either the barycenter or the center of the envelope, not sure that makes a big difference) and then to check that the point is inside the polygon. If the point is inside the polygon, keep it. If the point is not inside the polygon, use a geometry service to find a better location.
I remember to have seen that in a sample but I don't remember which one!