openlayers/openlayers — Issue #13: Accept function as url for XYZ layers
Author: JasonSanford
Created: 2011-10-10 20:22:11+00:00
State: open

For a few projects I've worked on the directory structure for tiled maps hasn't exactly follow the typical convention:

http://mytiles.com/my_tileset/{z}/{x}/{y}.png

For some reason the tiles on the back end are stored in a slightly deeper directory structure like:

http://mytiles.com/my_tileset/{z}/{first_two_chars_of_x}/{x}/{y}.png

I know it's kind of an odd case but I've had to alter the ```getURL``` method of the XYZ layer to also accept a function (that returns a url string) instead of the typical XYZ URL template.

If this is something you think would be beneficial to add I'd be glad to send a pull request.