Hi,<br><br> Reason why I want this layer as a vector layer is because I want to be able to modify features coming from Postgis database and represented on that layer using Openlayers and following examples like <a href="http://maps.peterrobins.co.uk/files/ol6.html" target="_top" rel="nofollow" link="external">http://maps.peterrobins.co.uk/files/ol6.html</a> or also <a href="http://www.openlayers.org/dev/examples/modify-feature.html" target="_top" rel="nofollow" link="external">http://www.openlayers.org/dev/examples/modify-feature.html</a> In my case, apart from drawing features and them modify it, which I also want, I need to edit features coming from database and first step is to put those features on a vector layer, am I right?<br>
<br>I know I will later find other problems because some days ago I learnt that Mapserver does not have support for WFS-T but I also found that I can add that support using extra packages like TinyOWS.. I will see.<br><br>
Also I have to implement drawing controls for the purpose I am explaining on the top of Geoext interface which I am using in collaboration with Openlayers.<br><br>Your advice on the whole thing is very welcome and I want to thank you very much in advance.<br>
<br>Kind regards,<br><br>Toni M.<br><br><div class="gmail_quote">2011/5/13 Alexandre Dubé [via OSGeo.org] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=6359366&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
        
Hi,<br>
<br>
Could you please explain in small details what do you want to do
with this layer and why you chose to display it as a vector layer ?
That would help us understand your need and what further tips to
give.<br>
<br>
Kind regards,<br>
<br>
Alexandre<div class="im"><br>
<br>
<br>
On 11-05-13 07:41 AM, tmartinh wrote:
</div><blockquote style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;" type="cite"><div class="im">Hi alll again and specially Alexandre,<br>
<br>
Yesterday I was trying your solution from a remote workspace using
VPN connection. Today, bck into the office, I saw your solution is
correct and my problem is solved.<br>
Anyway, maybe due to a big number of features to render,
performance in my explorer is slow.. I guess I will have to find
ways to improve it.. any tips?<br>
<br>
Thank you very much for your help!<br>
<br>
</div><div class="gmail_quote">2011/5/12 Alexandre Dubé [via OSGeo.org]
<span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=6359106&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span><div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 2px solid rgb(204, 204, 204); padding: 0pt 1em;"> Hi,
<br>
<br>
In your gml, you can see :
<br>
xmlns:ms="<a href="http://mapserver.gis.umn.edu/mapserver%22" rel="nofollow" link="external" target="_blank">http://mapserver.gis.umn.edu/mapserver"</a><br>
<br>
so try to set :
<br>
<br>
var molleres = new OpenLayers.Layer.Vector("molleres", {
<br>
strategies: [new OpenLayers.Strategy.BBOX()],
<br>
protocol: new OpenLayers.Protocol.WFS({
<br>
url:
<br>
"<a href="http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map%22" rel="nofollow" link="external" target="_blank">http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map"</a>,
<br>
featureType: "molleres",
<br>
featureNS: "<a href="http://mapserver.gis.umn.edu/mapserver%22" rel="nofollow" link="external" target="_blank">http://mapserver.gis.umn.edu/mapserver"</a><br>
}),
<br>
renderers: renderer
<br>
});
<br>
<br>
<br>
Does that help ?
<br>
<br>
Regards,
<br>
<br>
Alexandre
<br>
<br>
On 11-05-12 12:13 PM, tmartinh wrote:
<div>
<div><br>
> Hi all,
<br>
>
<br>
> I have been struggling to make the following setup
work.
<br>
>
<br>
> Mapserver 5.6.6 + Postgis + Openlayers and trying to
display a WFS layer
<br>
> with no success. Nothing gets rendered on the screen.
<br>
>
<br>
> Here is my configs:
<br>
>
<br>
> Mapfile
<br>
>
<br>
> MAP
<br>
> NAME INSPECCIONS_REDUIT # Nom del mapa
<br>
> STATUS ON
<br>
> SIZE 600 600
<br>
> EXTENT 521500 15000 556500 40000 # Extent del mapa
<br>
> UNITS METERS
<br>
> SHAPEPATH "data" # Carpeta o hi ha les dades SIG
<br>
> IMAGECOLOR 255 255 255
<br>
> IMAGETYPE PNG
<br>
>
<br>
>
<br>
> OUTPUTFORMAT # Format de sortida de la imatge
<br>
> NAME png
<br>
> DRIVER "GD/PNG"
<br>
> MIMETYPE "image/png"
<br>
> IMAGEMODE RGB #PC256
<br>
> EXTENSION "png"
<br>
> FORMATOPTION "INTERLACE=OFF"
<br>
> END
<br>
>
<br>
>
<br>
> # Projecci� corresponent a Andorra dsegons el codi
EPSG: 27573
<br>
>
<br>
> PROJECTION
<br>
> "init=epsg:27573"
<br>
> END
<br>
>
<br>
> #
<br>
> # Definici� de les dades WMS
<br>
> #
<br>
> WEB
<br>
> IMAGEPATH "/var/www/molleres/public/img/map/"
<br>
> IMAGEURL "/img/map/"
<br>
>
<br>
> METADATA
<br>
> "wfs_title" "WFS Demo
Server for MapServer" ##
<br>
> REQUIRED
<br>
> "wfs_onlineresource"
<br>
> "<a href="http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map%22" rel="nofollow" link="external" target="_blank">http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map"</a></div>
> ## Recommended
<div><br>
> "wfs_srs" "EPSG:27573" ##
Recommended
<br>
> "wfs_abstract" "This text
describes my WFS service."
<br>
> ## Recommended
<br>
> END
<br>
>
<br>
> END
<br>
>
<br>
> SYMBOL
<br>
> NAME 'circle'
<br>
> TYPE ELLIPSE
<br>
> POINTS 1 1 END
<br>
> FILLED TRUE
<br>
> END
<br>
>
<br>
> SYMBOL
<br>
> NAME 'rectangle'
<br>
> TYPE HATCH
<br>
> POINTS 1 1 END
<br>
> FILLED TRUE
<br>
> END
<br>
>
<br>
> SYMBOL
<br>
> NAME 'rectangle-train'
<br>
> TYPE VECTOR
<br>
> POINTS
<br>
> 0 0
<br>
> 0 0.6
<br>
> 1 0.6
<br>
> 1 0
<br>
> 0 0
<br>
> END
<br>
> FILLED TRUE
<br>
> STYLE
<br>
> 8 12 8 12
<br>
> END
<br>
> END
<br>
>
<br>
> # LEGEND object
<br>
> LEGEND
<br>
> STATUS ON
<br>
> KEYSIZE 18 12
<br>
> # LABEL object
<br>
> LABEL
<br>
> TYPE BITMAP
<br>
> SIZE MEDIUM
<br>
> COLOR 0 0 89
<br>
> END
<br>
> #TEMPLATE "templates/legend.html" ### HTML
template file
<br>
> END
<br>
>
<br>
>
<br>
>
<br>
>
<br>
> ##################
<br>
> # molleres
<br>
> ##################
<br>
> LAYER
<br>
> NAME "molleres"
<br>
> METADATA
<br>
> "wfs_title" "Molleres" ##REQUIRED
<br>
> "wfs_srs" "EPSG:27573" ## REQUIRED
<br>
> "gml_include_items" "all" ## Optional
(serves all attributes for
<br>
> layer)
<br>
> "gml_featureid" "gid" ## REQUIRED
<br>
> END
<br>
> TYPE POLYGON
<br>
> STATUS ON
<br>
> CONNECTIONTYPE POSTGIS
<br>
> CONNECTION 'user=postgres password=***
dbname=molleres host=172.16.3.240
<br>
> port=5432'
<br>
> DATA "the_geom from gis_schema.molleres_geom using
SRID=27573 using unique
<br>
> gid"
<br>
> PROJECTION
<br>
> "init=epsg:27573"
<br>
> END
<br>
> DUMP TRUE ## REQUIRED
<br>
> CLASS
<br>
> STYLE
<br>
> COLOR 255 128 0
<br>
> SYMBOL 'rectangle-train'
<br>
> SIZE 10
<br>
> END
<br>
> END
<br>
> END #layer
<br>
>
<br>
>
<br>
> END # Map File
<br>
>
<br>
> Openlayers
<br>
>
<br>
> var molleres = new
OpenLayers.Layer.Vector("molleres", {
<br>
> strategies: [new
OpenLayers.Strategy.BBOX()],
<br>
> protocol: new OpenLayers.Protocol.WFS({
<br>
> url:
<br>
> "<a href="http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map%22" rel="nofollow" link="external" target="_blank">http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map"</a>,
<br>
> featureType: "molleres",
<br>
> featureNS: "<a href="http://molleres%22" rel="nofollow" link="external" target="_blank">http://molleres"</a><br>
> }),
<br>
> renderers: renderer
<br>
> });
<br>
>
<br>
> Please note that this is an internal development
server reason why URL is
<br>
> not compliant with W3C standards. (no .com or
whatever)
<br>
>
<br>
> I have tried with several different options in my
mapfile and openlayers but
<br>
> no success.
<br>
>
<br>
> Also find attached my server answer I got from
firebug which looks fine.. I
<br>
> guess.
<br>
>
<br>
> <?xml version='1.0' encoding="ISO-8859-1" ?>
<br>
> <wfs:FeatureCollection
<br>
> xmlns:ms="<a href="http://mapserver.gis.umn.edu/mapserver%22" rel="nofollow" link="external" target="_blank">http://mapserver.gis.umn.edu/mapserver"</a><br>
> xmlns:wfs="<a href="http://www.opengis.net/wfs%22" rel="nofollow" link="external" target="_blank">http://www.opengis.net/wfs"</a></div>
> xmlns:gml="<a href="http://www.opengis.net/gml%22" rel="nofollow" link="external" target="_blank">http://www.opengis.net/gml"</a><br>
> xmlns:ogc="<a href="http://www.opengis.net/ogc%22" rel="nofollow" link="external" target="_blank">http://www.opengis.net/ogc"</a><br>
> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance%22" rel="nofollow" link="external" target="_blank">http://www.w3.org/2001/XMLSchema-instance"</a><br>
> xsi:schemaLocation="<a href="http://www.opengis.net/wfs" rel="nofollow" link="external" target="_blank">http://www.opengis.net/wfs</a><br>
> <a href="http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd" rel="nofollow" link="external" target="_blank">http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd</a><br>
> <a href="http://mapserver.gis.umn.edu/mapserver" rel="nofollow" link="external" target="_blank">http://mapserver.gis.umn.edu/mapserver</a><br>
> <a href="http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=feature:molleres&OUTPUTFORMAT=XMLSCHEMA%22%3E" rel="nofollow" link="external" target="_blank">http://molleres/cgi-bin/mapserv?map=/var/www/molleres/application/maps/molleres.map&amp;SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=feature:molleres&amp;OUTPUTFORMAT=XMLSCHEMA"></a><br>
> <gml:boundedBy>
<div><br>
> <gml:Box srsName="EPSG:27573">
<br>
>
<gml:coordinates>524801.051446,17249.106218
<br>
> 554734.725738,39483.294751</gml:coordinates>
<br>
> </gml:Box>
<br>
> </gml:boundedBy>
<br>
> <gml:featureMember>
<br>
> <ms:molleres fid="molleres.1">
<br>
> <gml:boundedBy>
<br>
> <gml:Box srsName="EPSG:27573">
<br>
>
<gml:coordinates>540182.891043,20436.589901
<br>
> 540206.224092,20489.562228</gml:coordinates>
<br>
> </gml:Box>
<br>
> </gml:boundedBy>
<br>
> <ms:msGeometry>
<br>
> <gml:Polygon srsName="EPSG:27573">
<br>
> <gml:outerBoundaryIs>
<br>
> <gml:LinearRing>
<br>
>
<gml:coordinates>540193.191218,20489.562228
<br>
> 540206.224092,20483.991726 540203.386289,20475.688524
<br>
> 540197.815786,20467.280218 540195.083086,20457.925977
<br>
> 540192.245283,20450.463606 540187.620715,20445.839037
<br>
> 540187.620715,20439.322600 540183.836977,20436.589901
<br>
> 540182.891043,20444.893103 540183.836977,20456.980043
<br>
> 540187.620715,20471.904786 540191.299349,20480.313092
<br>
> 540193.191218,20489.562228
540193.191218,20489.562228</gml:coordinates>
<br>
> </gml:LinearRing>
<br>
> </gml:outerBoundaryIs>
<br>
> </gml:Polygon>
<br>
> ...
<br>
>
<br>
> Any help is really appreciated. I really don't know
where to go further now.
<br>
>
<br>
> Best regards
<br>
>
<br>
> --
<br>
> View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6356333.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6356333.html</a></div>
> Sent from the OpenLayers Users mailing list archive at
Nabble.com.
<br>
> _______________________________________________
<br>
> Users mailing list
<br>
> <a href="http://user/SendEmail.jtp?type=node&node=6356398&i=0" rel="nofollow" link="external" target="_blank">[hidden
email]</a>
<br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></div>
<br>
<br>
-- <br>
Alexandre Dubé
<br>
Mapgears
<br>
<a href="http://www.mapgears.com" rel="nofollow" link="external" target="_blank">www.mapgears.com</a>
<br>
<br>
_______________________________________________
<br>
Users mailing list
<br>
<a href="http://user/SendEmail.jtp?type=node&node=6356398&i=1" rel="nofollow" link="external" target="_blank">[hidden
email]</a>
<br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br>
<br>
<hr color="#cccccc" noshade size="1">
<div style="color: rgb(68, 68, 68); font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
<div style="font-weight: bold;">If you reply to this email,
your message will be added to the discussion below:</div>
<a href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6356398.html" rel="nofollow" link="external" target="_blank">http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6356398.html</a>
</div>
<div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif; margin-top: 0.4em;"> To unsubscribe from WFS layer from Mapserver not
displaying, <a rel="nofollow" link="external" target="_top">click here</a>.
</div>
</blockquote>
</div></div></div>
<br>
<br>
<hr width="300" align="left">
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6359106.html" rel="nofollow" link="external" target="_blank">Re:
WFS layer from Mapserver not displaying</a><div class="im"><br>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html" rel="nofollow" link="external" target="_blank">OpenLayers
Users mailing list archive</a> at Nabble.com.<br>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="http://user/SendEmail.jtp?type=node&node=6359235&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</div></blockquote><div class="im">
<br>
<br>
<pre cols="72">--
Alexandre Dubé
Mapgears
<a href="http://www.mapgears.com" rel="nofollow" link="external" target="_blank">www.mapgears.com</a>
</pre>
<br>_______________________________________________
<br>Users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=6359235&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
        
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        </div><div style="color: rgb(68, 68, 68); font: 12px tahoma,geneva,helvetica,arial,sans-serif;"><div class="im">
                <div style="font-weight: bold;">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6359235.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6359235.html</a>
        </div><div><div></div><div class="h5">
        <div style="color: rgb(102, 102, 102); font: 11px tahoma,geneva,helvetica,arial,sans-serif; margin-top: 0.4em;">
                
                To unsubscribe from WFS layer from Mapserver not displaying, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.
        </div></div></div></blockquote></div><br>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6359366.html">Re: WFS layer from Mapserver not displaying</a><br/>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br/>