[OpenLayers-Users] WMSGetFeatureInfo (popup) not working
Arnd Wippermann
arnd.wippermann at web.de
Wed Nov 6 09:57:27 PST 2013
Hi Nomeneta,
Perhaps you have forgotten to add your domain to the proxy script?
Arnd
-----Ursprüngliche Nachricht-----
Von: Nomeneta Saili [mailto:nome.saili at gmail.com]
Gesendet: Dienstag, 5. November 2013 23:31
An: arnd.wippermann at web.de
Cc: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] WMSGetFeatureInfo (popup) not working
Hi Arnd,
Thanks for the help. I think i am getting closer now. It now does tries to
provide the information now when i click but it does not popup. I know it is
trying because the cursor is showing the waiting animation with the circling
cursor animation. It is the same on the example but the example does
eventually provide the popup unlike my application.
I think the issue might be with my proxy setting?.
"OpenLayers.ProxyHost = "proxy.cgi?url=";"
On Wed, Nov 6, 2013 at 8:04 AM, Arnd Wippermann <arnd.wippermann at web.de>
wrote:
> If you request for the same url as your wms, then it should work.
>
> //Getinfo
> info = new OpenLayers.Control.WMSGetFeatureInfo({
> url: 'http://118.139.181.241:8040/geoserver/wms/building_footprint',
title:
> 'Identify features by clicking',
> queryVisible: true,
> ...
>
> Regards,
> Arnd
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: openlayers-users-bounces at lists.osgeo.org
> [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von
> Nomeneta Saili
> Gesendet: Dienstag, 5. November 2013 15:20
> An: openlayers-users at lists.osgeo.org
> Betreff: [OpenLayers-Users] WMSGetFeatureInfo (popup) not working
>
> Hi list,
>
> I have followed the the example here
> http://dev.openlayers.org/releases/OpenLayers-2.13.1/examples/getfeatu
> reinfo
> -popup.html
>
> Somehow the info does not popup when i click on the features of WMS
> layers i have added to the map. My html is accessed from my laptop
> that is outside of where the Geoserver with layers is hosted.
>
> ++++++++++++++++++++++++++++++++++++++++++
> <script type="text/javascript" src="OpenLayers.js"></script>
>
> OpenLayers.ProxyHost = "proxy.cgi?url=";
>
> var info;
>
> //layer
> var wms_building = new
> OpenLayers.Layer.WMS('Building','http://118.139.181.241:8040/geoserver
> /wms/b
> uilding_footprint',{layers:
> 'building_footprint', transparent: true},{visibility: false});
>
> //Getinfo
> info = new OpenLayers.Control.WMSGetFeatureInfo({
> url: 'http://118.139.181.241:8040/geoserver/wms', title: 'Identify
> features by clicking',
> queryVisible: true,
> eventListeners: {
> getfeatureinfo: function(event) {
> map.addPopup(new OpenLayers.Popup.FramedCloud("chicken",
> map.getLonLatFromPixel(event.xy),null,event.text,null,true));
> }
> }
> });
> map.addControl(info);
> info.activate();
>
> +++++++++++++++++++++++++++++++
>
> Any advise/help appreciated.
>
> Thanks,
>
> Nome
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
More information about the Users
mailing list