var map; function init(){ var options = { projection: new OpenLayers.Projection("EPSG:3857"), units: "m", maxResolution: 78271.516953, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34) }; map = new OpenLayers.Map('map', options); var wms_sec = new OpenLayers.Layer.WMS( "Sectional Charts", "http://wms.chartbundle.com/wms", {layers: 'sec'} ); var wms_tac = new OpenLayers.Layer.WMS( "Terminal Area Charts", "http://wms.chartbundle.com/wms", {layers: 'tac'}); var wms_wac = new OpenLayers.Layer.WMS( "World Aeronautical Charts", "http://wms.chartbundle.com/wms", {layers: 'wac'}); var wms_enrl = new OpenLayers.Layer.WMS( "IFR Enroute Low Charts", "http://wms.chartbundle.com/wms", {layers: 'enrl'}); var wms_enra = new OpenLayers.Layer.WMS( "IFR Area Charts", "http://wms.chartbundle.com/wms", {layers: 'enra'}); var wms_enrh = new OpenLayers.Layer.WMS( "IFR Enroute High Charts", "http://wms.chartbundle.com/wms", {layers: 'enrh'}); var wms_secgrids = new OpenLayers.Layer.WMS( "Sectional Charts with Grid", "http://wms.chartbundle.com/wms", {layers: 'secgrids'} ); var wms_tacgrids = new OpenLayers.Layer.WMS( "Terminal Area Charts with Grid", "http://wms.chartbundle.com/wms", {layers: 'tacgrids'} ); var wms_wacgrids = new OpenLayers.Layer.WMS( "World Aeronautical Charts with Grid", "http://wms.chartbundle.com/wms", {layers: 'wacgrids'}); map.addLayers([wms_sec, wms_tac, wms_wac, wms_enrl, wms_enra, wms_enrh, wms_secgrids, wms_tacgrids,wms_wacgrids]); map.addControl(new OpenLayers.Control.LayerSwitcher()); var proj = new OpenLayers.Projection("EPSG:4326"); var point = new OpenLayers.LonLat(-97, 38); map.setCenter(point.transform(proj, map.getProjectionObject()),3); }