I've scaled my tilemap to fit nicely on the screen, but now positiontotilex and y is completely out. I have the tilemap on it's own layer, so I tried scaling that to the same scale, but I'm still getting the wrong results.
Just an update, I've noticed that mousex and mousey are miles off after scaling a layer, so that's the problem. Any idea how I fix this?