Fixed bug in toUrl with TMS tiles