More

GetTileUrlFunction Openlayers 3

GetTileUrlFunction Openlayers 3


I have a quadkey function to try to reach a non-Bing Source which uses a quadkey but it returns 404s everytime although the request looks correct. I wondered instead if I should try to pass a custom url to an ol.source.BingMaps layer? I've looked at the api and found the getTileUrlFunction/setTileUrlFunction but can't find any examples to demonstrate how to use it. My original question was kindly answered by Alvin Lindstam but I haven't yet had any success.

I'm wondering if the getTileUrlFunction is the right approach or whether I should try to use the uncompiled version of Openlayers and try to extend the base class? My javascript isn't really up to this and I wouldn't really know where to start but if necessary could I just duplicate the BingSource, give it a new name and insert a different URL?

From the base directory, the path is as follows: /50k/1202/0031/3033/12020031303302.ipic My function therefore returns this:

return baseURL + z + "/" + quadkey(x, y, z) + ".ipic";

I'm sure this may not make much sense so I've created a fiddle to try to demonstrate. These tiles all work perfectly in an old Silverlight app but I just can't get them to load and my client is non-technical to say the least!


Watch the video: , OpenLayers, PostgeSQL, GeoServer web application: create and deploy