hello. i am trying to get some input on this error.
i am new to OpenLayers and am just trying to load some of our own data. i am trying to load a wms layer from geoserver (spatial data comes from PostGres). when i go to geoserver (administrator on my local machine) and look at the demo requests for the service i am trying to load i can connect to it fine, using either a standard wms request or an openLayers request. however, when i try to load the wms layer in OpenLayers it fails. Error: "bounds has no properties" OpenLayers.js : line 533 I got the extents from ogrinfo. They seem to work for the geoserver requests, but not the openLayers. i am using the "Link to the hosted version" file from the website. i cannot figure out where this is failing. any leads would be appreciated. ie (these work from geoserver): geoserver demo: openLayers WMS ---------------------------------- http://127.0.0.1:8080/geoserver/wms?bbox=4154738.29412617,104907.9070201 7272,4463982.597581711,516373.2919801983&styles=&Format=application/open layers&request=GetMap&layers=MED_POST:cadstreets&width=550&height=250&sr s=EPSG:2270 geoserver demo: wms ---------------------------------- http://127.0.0.1:8080/geoserver/wms?bbox=4154738.29412617,104907.9070201 7272,4463982.597581711,516373.2919801983&styles=&Format=image/png&reques t=GetMap&layers=MED_POST:cadstreets&height=600&width=600&srs=EPSG:2270 open layers code is below (fails): ----------------------------- var bounds = new OpenLayers.Bounds(4154738.29412617,104907.90702017272,4463982.597581711, 516373.2919801983); alert("Bounds are \n" + bounds); var map = new OpenLayers.Map('map', { projection: "EPSG:2270", units: "ft", maxExtent: bounds,}); var gs_wms = new OpenLayers.Layer.WMS( "Med", "http://127.0.0.1:8080/geoserver/wms",{layers: 'MED_POST:cadstreets' , 'transparent':"true",'format': "image/png"}); gs_wms.setVisibility(true); map.addLayers(gs_wms]) map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.MousePosition()); map.zoomToMaxExtent(); Thanks, david _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
