<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi Steven,<br><br>perhaps this:<br><a rel="nofollow" target="_blank" href="http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost">http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost</a><br>could help you a little bit. <br>At examples page of OL you can find a proxy.cgi scipt for reference.<br><br>best regards<br>Sarah<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> Steven Venter <scventer43@telkomsa.net><br><b><span style="font-weight: bold;">An:</span></b> Frank Broniewski <brfr@metrico.lu>; users@openlayers.org<br><b><span style="font-weight:
bold;">Gesendet:</span></b> Montag, den 26. April 2010, 13:20:42 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [OpenLayers-Users] Basic GeoServer OpenLayers map<br></font><br>Hi Frank<br><br>Still no luck.<br><br>After clearing the browser cache firebug indicates that the file is loaded<br>but no image is generated on the map. The content of the file is correctly<br>displayed in firebug.<br><br>My code is based on the openlayers-2.8/examples/markersTextLayer.html.<br><br>My text file looks like this:<br>point title description image<br>-77.39929,39.40225 title somemarker icons/accident.png<br><br>I have tried icon as a column header but that did not help. Also i specified<br>the complete url for the image path but again that did not help.<br><br>If I use the OpenLayers.Layer.Vector() function I get the symbol and text<br>displayed. I feel that the OpenLayers.Layer.Text() function if more flexible<br>and would like to get it
working.<br><br>I noticed that the examples have this line of code<br>OpenLayers.ProxyHost="/proxy/?url="; but can’t find a reference of it in the<br>API docs. Can some one please explain it?<br><br>Steven<br><br>-----Original Message-----<br>From: Frank Broniewski [mailto:<a ymailto="mailto:brfr@metrico.lu" href="mailto:brfr@metrico.lu">brfr@metrico.lu</a>] <br>Sent: 26 April 2010 09:26 AM<br>To: Steven Venter; <a ymailto="mailto:users@openlayers.org" href="mailto:users@openlayers.org">users@openlayers.org</a><br>Subject: Re: [OpenLayers-Users] Basic GeoServer OpenLayers map<br><br>Hello Steven,<br><br>if the text layer is at the same level as the HTML page try {location: <br>"txtfile.txt"} . I don't think your relative path gets well translated<br><br>Frank<br><br><br>Am 26.04.2010 09:00, schrieb Steven Venter:<br>> Hi Frank<br>><br>> Thanks for your help. (this message was also sent to the mailing list -<br>> sorry about
that.)<br>><br>> I managed to solve the problem over the weekend. I used addLayers with a<br>> single layer supplied. I changed this to addLayer and my map displayed. I<br>> also added options to the map (maxResolution, maxExtent and projection).<br>><br>> Lesson, don't follow tutorials blindly.<br>><br>> But I still have a problem displaying a text layer.<br>><br>> var txtLayer = new OpenLayers.Layer.Text("text", {location:<br>> "./txtfile.txt"});<br>> map.addLayer(txtLayer);<br>><br>> When I view the Net tab in firebug FF is just sitting there trying to load<br>> the file.<br>> firebug net output: GET <a href="http://localhost/test/txtfile.txt" target="_blank">http://localhost/test/txtfile.txt</a><br>><br>> My txtfile.txt is tab separated.<br>><br>> Any suggestions?<br>><br>> Steven<br>><br>> -----Original Message-----<br>> From: Frank Broniewski [mailto:<a
ymailto="mailto:brfr@metrico.lu" href="mailto:brfr@metrico.lu">brfr@metrico.lu</a>]<br>> Sent: 26 April 2010 08:37 AM<br>> To: Steven Venter; <a ymailto="mailto:users@openlayers.org" href="mailto:users@openlayers.org">users@openlayers.org</a><br>> Subject: Re: [OpenLayers-Users] Basic GeoServer OpenLayers map<br>><br>> Please reply also to the OpenLayers list!<br>><br>> If the WMS request works in your browser there should'nt be a problem<br>> with the geoserver setup. I suspect the problem in your OL<br>> configuration. Usually I define a maxetent and a resolutions/or scale<br>> array for the map and then do a setCenter() at the end of the config ...<br>><br>> Please show us a minimal example. Without that it is impossible for us<br>> to locate your problem.<br>><br>> Frank<br>><br>> Am 24.04.2010 08:38, schrieb Steven Venter:<br>>> Hi Frank<br>>><br>>> If I
put<br>>><br>><br><a href="http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap" target="_blank">http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap</a><br>>><br>><br>&layers=topp:states$styles=&bbox=-124.7314220000001,24.955967,-66.969849,49.<br>>> 371735&width=708&height=330&srs=EPSG:4326&format=image/png in to my<br>> browsers<br>>> adders bar I get a png generate image of most of the USA states.<br>>><br>>> I also debugged my script to see what the request to the server looks<br>> like.<br>>> As far as I can tell it all seems right.<br>>><br>>> Under the DEFAULT_PARAMS variable I have this:<br>>> Exceptions "application/vnd.ogc.se_inimage<br>>> Format "image/jpeg"<br>>> Request "GetMap"<br>>> Service "WMS"<br>>> Style " "<br>>> Version
"1.1.1"<br>>><br>>> Under the params section I get the same but for the following:<br>>> FORMAT "image/png" -- as i requested<br>>> LAYERS "[topp:states]"<br>>><br>>> The url variable contain this:<br>>> <a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a><br>>><br>>> But I still can’t get the image displayed. I get the navigation items the<br>>> css border displayed, and in firebug the bounds is null error.<br>>><br>>> The layers that I use are standard geogerver layers that are<br>> pre-installed.<br>>> I’m using these until I can get the basics right.<br>>><br>>> 1. Do you have to specify the bounds? From the OL examples it doesn’t<br>seem<br>>> so.<br>>> 2. Could this be a server problem?<br>>> 3. What else could I check?<br>>> 4. Any other suggestions.<br>>><br>>>
Thanks for you help.<br>>> Steven<br>>><br>>> -----Original Message-----<br>>> From: Frank Broniewski [mailto:<a ymailto="mailto:brfr@metrico.lu" href="mailto:brfr@metrico.lu">brfr@metrico.lu</a>]<br>>> Sent: 23 April 2010 02:37 PM<br>>> To: Steven Venter; <a ymailto="mailto:users@openlayers.org" href="mailto:users@openlayers.org">users@openlayers.org</a><br>>> Subject: Re: [OpenLayers-Users] Basic GeoServer OpenLayers map<br>>><br>>> Hello Steven,<br>>><br>>> unfortunately I have no experience with geoserver, but request URLs from<br>>> Openlayers WMS are conform to the OGC standards and if geoserver is also<br>>> conform there should'nt be a problem. A OL generated request from my<br>>> application:<br>>><br>>><br>><br><a href="http://www.gis-hosting.lu/ogc/service/osm?LAYERS=label&STYLES=,,,&FORMAT=ima"
target="_blank">http://www.gis-hosting.lu/ogc/service/osm?LAYERS=label&STYLES=,,,&FORMAT=ima</a><br>>><br>><br>ge%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fv<br>>><br>><br>nd.ogc.se_inimage&SRS=EPSG%3A2169&BBOX=67416.666666,70311.458332975,88583.33<br>>> 3334,81688.541667025&WIDTH=1200&HEIGHT=645<br>>><br>>> It is in the Net tab from firebug. Something like GET osm?LAYERS= ...<br>>><br>>> If you suspect the problem with geoserver you could try the WMS requests<br>>> in your browser so you can be sure that they are working. If you think<br>>> its a OL configuration problem please show your layer config code so<br>>> that we can search there ...<br>>><br>>><br>>> A OL WMS Layer example:<br>>><br>>> new OpenLayers.Layer.WMS(<br>>>
'WMS',<br>>> '<a href="http://www.gis-hosting.lu/ogc/service/osm%27" target="_blank">http://www.gis-hosting.lu/ogc/service/osm'</a>,<br>>> {<br>>> layers: ['base','traffic','place-label'],<br>>> styles: ['','','',''], format: 'image/png'<br>>> },<br>>> {<br>>> isBaseLayer: true,<br>>> singleTile:
true<br>>> }<br>>> );<br>>><br>>> Frank<br>>><br>>><br>>> Am 23.04.2010 14:11, schrieb Steven Venter:<br>>>> Hi Frank<br>>>><br>>>> Thanks for replying.<br>>>><br>>>> I used firebug to look at the requests being sent to the server. The css<br>>>> stuff and the navigation items are requested but no request to fetch the<br>>>> image from the server.<br>>>><br>>>> I used geoserver functionality to display the image in a page. I then<br>cut<br>>>> and pasted that in to the code. I read on a tutorial site<br>>>> (<a href="http://vasir.net/blog/openlayers/openlayers-tutorial-part2-layers/" target="_blank">http://vasir.net/blog/openlayers/openlayers-tutorial-part2-layers/</a>)<br>that<br>>>>
some of the info for the request will be generated by openlayer, this<br>> site<br>>>> deals with MapServer so I tried to adapt that to geoserver.<br>>>><br>>>> I will try what you suggested, but I’m not sure which parts of the<br>> request<br>>>> are auto generated.<br>>>><br>>>> Steven<br>>>><br>>>> -----Original Message-----<br>>>> From: Frank Broniewski [mailto:<a ymailto="mailto:brfr@metrico.lu" href="mailto:brfr@metrico.lu">brfr@metrico.lu</a>]<br>>>> Sent: 23 April 2010 08:17 AM<br>>>> To: ZAMap<br>>>> Subject: Re: [OpenLayers-Users] Basic GeoServer OpenLayers map<br>>>><br>>>> Hi,<br>>>><br>>>> did you already try to put the requested URL from the OpenLayers request<br>>>> in the address field of your browser and examine the response? I use<br>>>> Firebug for that and this
already helps me alot for debugging WMS<br>>> requests.<br>>>><br>>>> Frank<br>>>><br>>>> Am 22.04.2010 20:03, schrieb ZAMap:<br>>>>><br>>>>> Hi all<br>>>>><br>>>>> I'm trying to get a basic map displayed but keep getting bounds is null<br>>>>> error.<br>>>>><br>>>>> None of the suggestions (allOverlays: true) that I found works, most<br>>>>> probably because of other issues with my code/setup.<br>>>>><br>>>>> Code:<br>>>>><br>>>>> function init() {<br>>>>> var map = new OpenLayers.Map('map');<br>>>>><br>>>>> var layers = new OpenLayers.Layers.WMS(<br>>>>> "basic",<br>>>>> "<a
href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>>>>> {layers: 'topp:states'}<br>>>>><br>>>>> map.addLayers(layers);<br>>>>> map.zoomToMaxExtent();<br>>>>> }<br>>>>><br>>>>> My geoserver is working, I can request the map and other data from the<br>>>>> server. Any pointers to good tutorials are welcome.<br>>>>><br>>>>> Setup:<br>>>>> Ubuntu 9.10<br>>>>> GeoServer 2.0.1<br>>>>> Openlayers 2.8<br>>>>><br>>>>> I would appreciate any help.<br>>>><br>>>><br>>><br>>><br>><br>><br><br><br>-- <br>Frank BRONIEWSKI<br><br>METRICO s.à r.l.<br>géomètres<br>technologies d'information géographique<br>rue des Romains 36<br>L-5433
NIEDERDONVEN<br><br>tél.: +352 26 74 94 - 28<br>fax.: +352 26 74 94 99<br><a href="http://www.metrico.lu" target="_blank">http://www.metrico.lu</a><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@openlayers.org" href="mailto:Users@openlayers.org">Users@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br></div></div>
</div><br></body></html>