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

Jim Klassen klassen.js at gmail.com
Mon Jan 14 09:56:24 PST 2019


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 <http://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 <http://properties.id> }}
>                             </a>
>                         </div>
>                     </div>
>                     <div class="search-address">
>                         {{ properties.name <http://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 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/20190114/4c6cee6a/attachment.html>


More information about the Geomoose-users mailing list