Problem
How to calculate center of each custom tile as a point (x,y) or (x,y,z) where z is zoom level, in a projection: EPSG:3857?
What I know about the tiles
- Originally they are served as TMS
- They represent png images 256*256
- They are in projection: EPSG:3857
- In OpenLayers2 they were coded like TMS layer
- In OpenLayers3 (v.3.8.2) they are coded like XYZ layer (that includes -y) as shown in this example:
-
var baseLayer = new ol.layer.Tile({
source: new ol.source.XYZ({
url: 'http://path/to/the/tiles/base/{z}/{x}/{-y}.png'
})
})