openlayers / openlayers

OpenLayers
https://openlayers.org
BSD 2-Clause "Simplified" License
11.31k stars 3.03k forks source link

Canvas tiles example no canvasFunction API #4323

Closed ChouGary closed 6 years ago

ChouGary commented 8 years ago

Canvas tiles example only show xyz, no way to show 「tile extent、tile url、tile json url、related features number」 for tile debug . image

http://openlayers.org/en/master/examples/canvas-tiles.html need api 『canvasFunction』 show custome message, like D3 sample http://openlayers.org/en/v3.10.1/examples/d3.html

ahocevar commented 8 years ago

Would you be willing to create a pull request? Basically all you need to do is add a textFunction option to olx.source.TileDebugOptions in externs/olx.js and use that function in src/source/tiledebugsource.js, with a default of what we currently have.