<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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<br>
<br>
<br>
On 11-05-13 07:41 AM, tmartinh wrote:
<blockquote
cite="mid:BANLkTi=nJq0j__GcE52gdECfNvHxrCEZpQ@mail.gmail.com"
type="cite">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 class="gmail_quote">2011/5/12 Alexandre Dubé [via OSGeo.org]
<span dir="ltr"><<a moz-do-not-send="true"
href="/user/SendEmail.jtp?type=node&node=6359106&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>
In your gml, you can see :
<br>
xmlns:ms="<a moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 class="shrinkable-quote"><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 moz-do-not-send="true"
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 class="shrinkable-quote"><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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://www.opengis.net/wfs%22" rel="nofollow"
link="external" target="_blank">http://www.opengis.net/wfs"</a></div>
> xmlns:gml="<a moz-do-not-send="true"
href="http://www.opengis.net/gml%22" rel="nofollow"
link="external" target="_blank">http://www.opengis.net/gml"</a><br>
> xmlns:ogc="<a moz-do-not-send="true"
href="http://www.opengis.net/ogc%22" rel="nofollow"
link="external" target="_blank">http://www.opengis.net/ogc"</a><br>
> xmlns:xsi="<a moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://www.opengis.net/wfs" rel="nofollow"
link="external" target="_blank">http://www.opengis.net/wfs</a><br>
> <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://mapserver.gis.umn.edu/mapserver"
rel="nofollow" link="external" target="_blank">http://mapserver.gis.umn.edu/mapserver</a><br>
> <a moz-do-not-send="true"
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 class="shrinkable-quote"><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
moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://user/SendEmail.jtp?type=node&node=6356398&i=0"
rel="nofollow" link="external" target="_blank">[hidden
email]</a>
<br>
> <a moz-do-not-send="true"
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 moz-do-not-send="true" href="http://www.mapgears.com"
target="_blank" rel="nofollow" link="external">www.mapgears.com</a>
<br>
<br>
_______________________________________________
<br>
Users mailing list
<br>
<a moz-do-not-send="true"
href="http://user/SendEmail.jtp?type=node&node=6356398&i=1"
rel="nofollow" link="external" target="_blank">[hidden
email]</a>
<br>
<a moz-do-not-send="true"
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="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 moz-do-not-send="true"
href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6356398.html"
target="_blank" rel="nofollow" link="external">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 moz-do-not-send="true" href=""
target="_blank" rel="nofollow" link="external">click here</a>.
</div>
</blockquote>
</div>
<br>
<br>
<hr align="left" width="300">
View this message in context: <a moz-do-not-send="true"
href="http://osgeo-org.1803224.n2.nabble.com/WFS-layer-from-Mapserver-not-displaying-tp6356333p6359106.html">Re:
WFS layer from Mapserver not displaying</a><br>
Sent from the <a moz-do-not-send="true"
href="http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers
Users mailing list archive</a> at Nabble.com.<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>