[Geomoose-users] mapserver - mapserver-wfs and search service

TC Haddad tchaddad at gmail.com
Wed Jan 16 13:05:56 PST 2019


Can you report the epsg code for your layer?

And then, can you check the order of the epsg codes listed in your INCLUDE
'../../common_metadata.map'file?

I've found that the projection of the layer being searched needs to be
listed* first *in the list of projections for 'ows_srs' and 'wfs_srs,
otherwise the search will return no results.

Not sure if that is a bug, but I've had it come up with users a couple of
times, and have been meaning to report it so that people are at least aware
of it. It's particularly hard for users to figure out because the key lines
are in the INCLUDE file.

maybe that helps you solve the problem?

Tanya


On Mon, Jan 14, 2019 at 9:56 AM Jim Klassen <klassen.js at gmail.com> wrote:

> I think that means that MapServer isn't returning any results.  There are
> many potential causes for that.  It could be the query is running properly
> but not returning any features because nothing matched, it could be there
> is a problem in the mapfile or mapbook, maybe an encoding problem, ...
>
> Can you see what GeoMoose is sending to mapserver and how mapserver is
> responding using the browser developer tools?
> On 1/12/19 5:08 PM, Stathis G. Arapostathis wrote:
>
> Hello,
>
> I followed the example of the parcels dataset of the gm3 demo and I
> created two map-sources in mapbook for the same dataset.
>
> The first one uses type = mapserver while the second one uses type =
> mapserver-wfs.
>
> I did this because the search service does not work with the mapserver
> type.
>
> I can see both of my layers in my geomoose app (the names of the layers
> are cemeteries/cemeteries and vector-cemeteries/cemeteries).
>
> But:
>
> When i use search with the the vector-cemeteries/cemeteries layer
> (type=mapserver-wfs) the layer is recognized (I see layer:1 in the results)
> but the features are not (I see features:0 in the results). As a result
> search is not working properly.
>
> I use the same .map file for both of them layers of mapbook.
>
>
>
> Below you can find the search template and the addition in app.js
> ===================================
>
> My search template is pretty simple:
> <![CDATA[
>                 <div class="search-result">
>                     <div class="search-label">
>                         {{ properties.name }}
>                     </div>
>                     <div class="search-action">
>                         <div style="padding: 2px">
>                             <a onClick="app.zoomToExtent([{{
> properties.boundedBy | join }}])" class="zoomto-link">
>                                 <i class="fa fa-search"></i>
>                                 {{ properties.id }}
>                             </a>
>                         </div>
>                     </div>
>                     <div class="search-address">
>                         {{ properties.name }}<br/>
>                         {{ properties.city }}<br/>
>                     </div>
>                 </div>
>             ]]>
>
> The javascript code of the app.js is:
>
> app.registerService('search-cemeteries', SearchService, {
>          searchLayers: ['vector-cemeteries/cemeteries'],
> fields: [
>             {type: 'select', label: 'City', name: "id",
>              options: [
>                 { label: "Ακρωτήριο Πούντα", value: "17" },
> { label: "Αλεξανδρούπολη", value: "6" },
>                 { label: "Θεσσαλονίκη (Ζέιτενλινκ)", value: "2" },
>     { label: "Καλαμαριά (κοιμητήριο)", value: "18" },
> { label: "Καλαμαριά (επιτύμβιες στήλες)", value: "3" },
> { label: "Καλοσκοπή", value: "10" },
>                 { label: "Καρούτες", value: "12" },
> { label: "Κάτω Κορυφή", value: "11" },
> { label: "Μεσόβουνο  (Κοζάνη)", value: "9" },
>                 { label: "Μούδρος", value: "7" },
> { label: "Μπράλος", value: "8" },
> { label: "Παλαιό Φάληρο", value: "13" },
>                 { label: "Πειραιάς", value: "1" },
> { label: "Πεντάλοφος (Κοζάνη)", value: "16" },
> { label: "Ρέθυμνο", value: "4" },
>                 { label: "Στυλίδα", value: "14" },
> { label: "Σφακτηρία (Μεσσηνία)", value: "15" },
>                 { label: "Χανιά", value: "5" }
>              ]
> }
>         ]
>
>     });
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
>
> _______________________________________________
> Geomoose-users mailing listGeomoose-users at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/geomoose-users
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20190116/9ab7e457/attachment.html>


More information about the Geomoose-users mailing list