I'm using OpenLayers 3 and attempting to display a layer based on a custom tile grid in a custom projection (EPSG:4202) on a standard projection map (EPSG:3785). The layer is essentially a photo of a map that I took, and then split it into a tile grid of images. I have successfully created the directory structure and image files, and OpenLayers can see them and display them, putting all the tiles together in the right sequence relative to each other.
However, the layer is displayed much, much smaller than it should be. The origin is in the right place, but the image is tiny... all shrunk up towards the origin.
Assertion Failed: reasonable number of tiles is required).
Eventually it displays a small rectangular image where the origin (top-left) of this image is in the correct location. But the image should be much larger and should extent much further down and to the right.
Complete code is below.
resolution = ( imageExtentInLayerProjection - imageExtentInLayerProjection ) / imageWidth
Each subsequent resolution is:
resolution /= 2
imageExtentInLayerProjection is the extent of the intended layer's spatial reference system that the original map image should cover. It is an array of the form: [minX, minY, maxX, maxY]. The values were taken from the map graticule labels. The actual values are: [146.5, -41.5, 147, -41]).
What am I doing wrong here?