|Map Tiling Service / How Pixels, Tiles, and Map Coordinates are Transformed|
To pan or zoom a map based on tiles from the Map Tiling Service the client must have the ability to convert a pixel to a location on the Earth. To do this the client must create an affine transform that when given a coordinate in pixels returns a coordinate in the projection of the tiles. You need to know the projection of the tiles, the bounds of the map being tiled, and the dimensions of a tile. Given this information you must do the following:
To perform these steps, and transform a pixel into your map's coordinate system:
The getDescription method provides all the information needed to construct the affine transform like tileWidth, tileHeight, map projection, and map bounds. See getDescription.