Sets the function that will be used when converting tile coordinates (X/Y) to the tilegrid index.
1 function method
the method to use.