Avoid using float, fix #1741
- Solution is not perfect, but works for practical purposes.
- Fix works up to 4 levels of zoom down on Firefox (more on Chrome).
Avoid tiles wrapping with zooming out, see #1741