Since this
changes in an event context (points to global
usually), you need to store a reference to yourself outside of the event:
function Map() {
this.x = 0;
this.y = 0;
var _self = this;
$("body").mousemove( function(event) {
_self.x = event.pageX; // Is now able to access Map's member variable "x"
_self.y = event.pageY; // Is now able to access Map's member variable "y"
});
}