add proper calculation of pixel position of location on tile, remove a gem dependency