fork from http://code.google.com/p/xmappr/