Support for UTM in JXMapViewer
I'm trying to use the JXMapViewer component with tilecache (tilecache.org). It's not an option using lat/long since my country would look like a flat banana :). So I'm calculating the bounds for the tiles in UTM using x, y and zoom by overriding the toWMSURL method in WMSService, this is where my problems begin.
I have a list with the resolutions of the zoomlevels created in tilecache, and I've mapped the resolutions to a zoomlevel in TileFactoryInfo. But i suspect that the zoomlevels in the mapviewer is calculated such that each zoomlevel contains four times the tile count than the previous zoomlevel and thereby keeping the coordinate system intact. However, the zoomlevels provided by tilecache are based on how many meters each pixel represent, so each time I zoom the coordinates gets barfed so when I try to get or set a GeoLocation from the JXMapViewer the location does'nt match the map.
I'm a bit lost as to what I can do to take advantage of the JXMapViewer component. It's perfect for my use, it has a small footprint and have exactly the features that I need, only problem is that I have to use UTM instead of lat/long.
Any help is appreciated! Thanks!.