Hi,

"I got your second approach idea. But is that using WMSfeaturegetinfo or my
method? And it sounds like giving all queryable layers' information within
one window only, right?"

It use your method and it will only open one window. But if there is no
result for all queried layers, the window open nevertheless. If you want to
control the response from your request, you have to use an ajax call. Then
you get back the response as text and if it's not empty, you show the
response in a window.

Arnd  

-----Ursprüngliche Nachricht-----
Von: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] Im
Auftrag von Aypes2
Gesendet: Dienstag, 17. November 2009 03:00
An: users@openlayers.org
Betreff: Re: [OpenLayers-Users] Query problem



Arnd Wippermann wrote:
> 
> Hi,
> 
> It seems, that your loop creates the window for your first queryable 
> layer and then the queryresult of your next queryable layers use the 
> same window and overwrite the contents of the window "getfeatureinfo". The
last wins.
> 
> If you change the window name to "getfeatureinfo" + i, then you should 
> get one window for every query.
> 
> A second approach is to collect the visibible layers and do only one 
> getfeatureinfo request with this layerlist. Then you get back from 
> MapServer one result html for all the queried layers.
> 
> Arnd
> 
> -----Ursprüngliche Nachricht-----
> Von: users-boun...@openlayers.org 
> [mailto:users-boun...@openlayers.org] Im Auftrag von Aypes2
> Gesendet: Freitag, 13. November 2009 08:24
> An: users@openlayers.org
> Betreff: [OpenLayers-Users] Query problem
> 
> 
Hi,

Sorry for late reply. I have done what you said with "getfeatureinfo" + i,
when I click each time, there are one window for each query. 

But how can I open 1 window only when querying? I have 6 layers, and if I
turn on 6 layers, 6 windows come out when clicking on the map. Only 1
windows contains information but others are useless ("EMPTY" template in
MapServer). I want the required window comes out only and the "EMPTY"
template comes out when clicked coordinates have nothing.

I think I should write some more 'if' statements to make it work, but I have
no idea about how to do this. I tried to compare the layer's
coordinates/pixels with e.xy.x and e.xy.y, so window comes out only when
they are same. But it fails, maybe I get the layer's coordinates wrongly. I
also tried to make mslayers[i] in ("&QUERY_LAYERS=" + mslayers[i]) in which
window comes out when mslayers[i] is not empty template, but fails too.

I got your second approach idea. But is that using WMSfeaturegetinfo or my
method? And it sounds like giving all queryable layers' information within
one window only, right?

Thanks
Aypes2


--
View this message in context:
http://n2.nabble.com/Query-problem-tp3997793p4016028.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to