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

Stathis G. Arapostathis e.arapostathis at gmail.com
Sat Jan 12 15:08:23 PST 2019


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>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20190113/00961c4a/attachment.html>


More information about the Geomoose-users mailing list