Hi Tom,<br><br>Thanks for the insight. My problems starts at the point when i want to link OpenLayers with FeatureServer. Is there is any other configuration i need to do apart from featureserver.cfg file?<br><br>Looks like when i pass my url which is localhost/featureserver-1.2/featureserver.cgi/mylayer?Format=WFS as the source of the layers it isnt seen.<br>
<br><br>Thanks ,<br><br>Gabriel.<br><br><br><div class="gmail_quote">On 7 September 2011 17:39, Tom A. Cox <span dir="ltr"><<a href="mailto:tomc@hot.rr.com">tomc@hot.rr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Gabriel,<br>
<br>
I haven't done a lot of work with Featureserver/OpenLayers and I haven't used<br>
WMS at all, but I have a basic mapping system I worked on last year using WFS.<br>
Hope this info helps.<br>
<br>
My featureserver.cfg file is similar to yours. The OpenLayers interface uses<br>
WFS. So...<br>
<br>
featureserver.cfg:<br>
<br>
[frontload]<br>
type=PostGIS<br>
dsn=host=localhost dbname=gis user=tomc password=<br>
layer=frontload<br>
fid=fid<br>
geometry=way<br>
srid=4326<br>
attribute_cols=service_ref,service_num,service_name,street_num,street_name,city,state,zipcode,container_type,serial_number,begin_date,status<br>
<br>
<br>
index.html script section:<br>
<br>
var cgi_url = "/cgi-bin/featureserver.cgi";<br>
<br>
wfs_frontload = new OpenLayers.Layer.WFS(<br>
"Frontload",<br>
cgi_url + "/frontload?format=WFS",<br>
{maxfeatures: max_features},<br>
{extractAttributes: true, displayInLayerSwitcher: true,<br>
visibility: false, styleMap: map_styles,<br>
projection: new OpenLayers.Projection("EPSG:4326")}<br>
);<br>
<br>
OpenStreetMap.js, OpenLayers.Layer.OSM.Mapnik function modified for base url.<br>
You may not need this if you are using a standard directory layout or for WMS.<br>
<div><div></div><div class="h5"><br>
<br>
On Tuesday 06 September 2011 3:19:00 pm Gabriel ODUORI wrote:<br>
> Hi,<br>
><br>
> I am working on my thesis and i am somehow stuck. I have a PostGIS database<br>
> up and running and have included sone tables in a configuration file that i<br>
> would like to be read and loaded on open layers.<br>
><br>
> My cinfiguration looks like this<br>
><br>
><br>
> [Primary_canal]<br>
> type=PostGIS<br>
> dsn=host=localhost dbname=Project user=postgres password=gabbs<br>
> layer=Primary_canal<br>
> fid=gid #defaults to ogc_fid<br>
> geometry=the_geom # defaults to the_geom<br>
> srid=4326 #defaults to 4326<br>
> attribute_cols=name,barragenam #optional<br>
> order=name #optional<br>
><br>
> I am looking for a way to have my layers served to open layers through a<br>
> method like this example from GeoServer.<br>
><br>
> new OpenLayers.Layer.WMS("Cities",<br>
> "<a href="http://demo.opengeo.org/geoserver/wms" target="_blank">http://demo.opengeo.org/geoserver/wms</a>", { ## I would<br>
> like this line to point to my table in the featureserver.cgi file<br>
> layers: "topp:tasmania_cities",<br>
> transparent: true,<br>
> format: "image/gif"<br>
> }, {<br>
> isBaseLayer: false,<br>
> buffer: 0<br>
> Many thanks,<br>
><br>
> Gabriel.<br>
</div></div>--<br>
<font color="#888888">Tom A. Cox<br>
IntelliSystems<br>
Systems Analyst and Consultant<br>
Office: 254-848-5598 Email: Tom Cox <<a href="mailto:tomc@hot.rr.com">tomc@hot.rr.com</a>><br>
_______________________________________________<br>
Featureserver mailing list<br>
<a href="mailto:Featureserver@lists.osgeo.org">Featureserver@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/featureserver" target="_blank">http://lists.osgeo.org/mailman/listinfo/featureserver</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">Jamia House </span><br style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">
<span style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">P.O. Box 101259 – 00101</span><br style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);"><span style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">Nairobi (Kenya) </span><br style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">
<span style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">+254 (0)733763826</span><br style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);"><span style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);"><a href="mailto:gabriel.oduori@gmail.com">gabriel.oduori@gmail.com</a></span><br style="font-family: trebuchet ms,sans-serif; color: rgb(0, 0, 102);">
<br><br><br>