Solved! Go to Solution.
Seems to be a bug in version 2.4. It's working well with 2.2, 2.3, 3.0, 3.1 versions but not with 2.4.
In 2.4, the workaround is to set the SpatialReference of the map points and of the map extent. With these initializations it's working well.