Discussion:
[OpenLayers-Users] Need help with WMSGetFeatureInfo
Zuhex
2010-07-16 05:31:10 UTC
Permalink
Hello all,

How can the popup show the information if I give the value of ux and uy.
If the function looks like this,

function popup_s(ux,uy)
{
if (popup != null) {
popup.destroy();
popup = null;
}
var ux,uy;
popup = new OpenLayers.Popup.FramedCloud("chicken",
new OpenLayers.LonLat(ux,uy),
null,
event.text, <<----How could it be?
null,
true
);
map.addPopup(popup);
map.setCenter(new OpenLayers.LonLat(ux, uy), 2);
}

Any suggestion?
Thank you.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5300515.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Sarah Schuessler
2010-07-16 07:13:22 UTC
Permalink
Hi,

do you want to show only ux and uy or do you want to do a
wmsgetfeatureinforequest with that?


best regards
Sarah


________________________________
Von: Zuhex <***@hotmail.com>
An: ***@openlayers.org
Gesendet: Freitag, den 16. Juli 2010, 7:31:10 Uhr
Betreff: [OpenLayers-Users] Need help with WMSGetFeatureInfo


Hello all,

How can the popup show the information if I give the value of ux and uy.
If the function looks like this,

function popup_s(ux,uy)
{
if (popup != null) {
popup.destroy();
popup = null;
}


var ux,uy;
popup = new OpenLayers.Popup.FramedCloud("chicken",
new OpenLayers.LonLat(ux,uy),
null,
event.text, <<----How could it be?
null,
true
);
map.addPopup(popup);
map.setCenter(new OpenLayers.LonLat(ux, uy), 2);
}

Any suggestion?
Thank you.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5300515.html

Sent from the OpenLayers Users mailing list archive at Nabble.com.
Zuhex
2010-07-16 07:26:57 UTC
Permalink
Hi Sarah,

Sorry for the question is not clear. I want to do a
wmsgetfeatureinforequest.
Do you have any suggestion?


Thank you
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5300775.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Sarah Schuessler
2010-07-16 07:34:59 UTC
Permalink
Hi,

did you see this (you can even look at examples pages of OL):
var infoControls =
new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://xxxxx:8080/geoserver/wms?',
title: 'Identify features',
infoFormat: 'text/plain',
queryVisible: true,
eventListeners: {
getfeatureinfo: function (event){
map.addPopup(new OpenLayers.Popup.FramedCloud(
"chicken",
map.getLonLatFromPixel(event.xy),
null,
null,
event.text,
null,
true));
}
}
});


HTH
best regards
Sarah


________________________________



Hi Sarah,

Sorry for the question is not clear. I want to do a
wmsgetfeatureinforequest.
Do you have any suggestion?


Thank you
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5300775.html

Sent from the OpenLayers Users mailing list archive at Nabble.com.
Zuhex
2010-07-17 03:54:24 UTC
Permalink
Hi,

I tried to change the line "map.getLonLatFromPixel(event.xy)" to
"map.getLonLatFromPixel(ux,uy)"
It still don't work, I think because I want to show a popup without clicking
on the map.
Otherwise I received xy from the users put in it. I think those codes are
processed when clicking on map.

How can I modify the code for receive the value xy from the users?


Thank you.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5304993.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Zuhex
2010-07-18 05:46:55 UTC
Permalink
I think I should describe with pictures.

Loading Image...

Loading Image...

In the popup you will see the numbers of the point, this point is contained
xy coordinate.
Question how can I show the rest of attribute data (like when you are
clicking on the map) from that point?

I'm using GeoServer+OL2.8


function popup_s(ux,uy)
{
if (popup != null) {
popup.destroy();
popup = null;
}
var ux,uy;
popup = new OpenLayers.Popup.FramedCloud("chicken",
new OpenLayers.LonLat(ux,uy),
null,
ux+","+uy,
null,
true
);
map.addPopup(popup);
map.setCenter(new OpenLayers.LonLat(ux, uy), 2);
}

thank you and sorry for my English

มีคนไทยเล่นบอร์ดนี้บ้างมั้ยครับ
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Need-help-with-WMSGetFeatureInfo-tp5300515p5307992.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...