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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Stathis G. Arapostathis
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" }
             ]
}
        ]
       
    });


Virus-free. www.avast.com

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

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

James Klassen

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" }
             ]
}
        ]
       
    });


Virus-free. www.avast.com

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

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

TC Haddad

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 <[hidden email]> 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" }
             ]
}
        ]
       
    });


Virus-free. www.avast.com

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

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

Stathis G. Arapostathis
Tanya I love you!

Thank you very much. Thank you so much. That was the problem. The search service works perfectly!!!!

Stathis



Στάλθηκε από το smartphone Samsung Galaxy.

-------- Αρχικό μήνυμα --------
Από: TC Haddad <[hidden email]>
Ημερομηνία: 16/1/19 23:05 (GMT+02:00)
Προς: Jim Klassen <[hidden email]>
Κοιν.: [hidden email]
Θέμα: Re: [Geomoose-users] mapserver - mapserver-wfs and search service


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 <[hidden email]> 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" }
             ]
}
        ]
       
    });


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

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

TC Haddad

Great! I will definitely put this in Github as at least a documentation issue.

Tanya

On Wed, Jan 16, 2019 at 1:26 PM e.arapostathis <[hidden email]> wrote:
Tanya I love you!

Thank you very much. Thank you so much. That was the problem. The search service works perfectly!!!!

Stathis



Στάλθηκε από το smartphone Samsung Galaxy.

-------- Αρχικό μήνυμα --------
Από: TC Haddad <[hidden email]>
Ημερομηνία: 16/1/19 23:05 (GMT+02:00)
Προς: Jim Klassen <[hidden email]>
Κοιν.: [hidden email]
Θέμα: Re: [Geomoose-users] mapserver - mapserver-wfs and search service


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 <[hidden email]> 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" }
             ]
}
        ]
       
    });


Virus-free. www.avast.com

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users

_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users