[OpenLayers-Users] wmsgetfeatureinfo with url on alternative port not firing on client side

Andreas Hocevar ahocevar at opengeo.org
Fri Jul 13 11:53:25 PDT 2012


Sounds like your app script is hosted at http://160.97.12.223:80/. To
send AJAX requests to http://160.97.12.223:8000/, you would need a
proxy. This is because of the browser's Same Origin Policy (different
port - different origin).

Andreas.

On Fri, Jul 13, 2012 at 11:46 AM, Giuseppe De Marco <peppelinux at yahoo.it> wrote:
> I've:
>
>                 wmsgetfeatinfo: new OpenLayers.Control.WMSGetFeatureInfo({
>                                     url:
> 'http://160.97.12.223:8000/cgi-bin/mapserv?map=/var/www/difsuolo_luci_mapfile/mapfile.map',
>                                     //url:
> 'http://160.97.12.223:80/cgi-bin/mapserv?map=/var/www/difsuolo_luci_mapfile/mapfile.map',
>                                     title: 'Identify features by clicking',
>                                     infoFormat:'text/html',
>                                     click: 'true',
>                                     queryVisible: true,
>                                     eventListeners: {
>                                         getfeatureinfo: function(event) {
>                                             map.addPopup(new
> OpenLayers.Popup.FramedCloud(
>                                                 "chicken",
>
> map.getLonLatFromPixel(event.xy),
>                                                 null,
>                                                 event.text,
>                                                 null,
>                                                 true
>                                             ));
>                                             }
>                                         }
>                                     }),
>
> If I use url with port 80 it works, if I use url with port 8000 the
> openlayers client didn't fire any event on click. In browser debug console I
> didn't view any xhrequest, neither on server.
>
> I use openlayers 2.11 and this problems is on firefox and google chrome.
> I use ubuntu 12.04.
>
> I saw many examples, on web, that uses alternative ports with wmsgetfeature
> info and I'd like to understand this behaviour first of implement some
> alternative solution.
>
> Cheers,
> g
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list