OpenLayers.Layer.KaMap is now working much better. The TIGER example which was just a hack before is now working properly, and there's an actual scale calculation being performed based on params passed into the constructor of 'units' and 'resolution', both of which are determined by the mapfile. The only limitation yet to be tackled is that maxResolution on the map must split the map up such that 0,0 is a tile corner. This requires subclassing more (or perhaps all) of the Layer.Grid functions, so I'm off to do that now.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@763 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map', {'maxResolution': 1.2/4, controls:[]});
|
||||
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap", "http://maps.dmsolutions.ca/demo/us_streets/tile.php", {map:'tiger04', g:'__base__'}, new OpenLayers.LonLat(0,0));
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap", "http://maps.dmsolutions.ca/demo/us_streets/tile.php", {map:'tiger04', g:'__base__'});
|
||||
ka_wms.setTileSize(new OpenLayers.Size(300,300));
|
||||
map.addLayers([ka_wms]); // , ka_wms, kamap_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.setCenter(new OpenLayers.LonLat(-70, 30), 2);
|
||||
map.setCenter(new OpenLayers.LonLat(-96, 35), 2);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user