[OpenLayers-Users] GetFeature info in popup

Gis Newbye gisnewbye at gmail.com
Sat Oct 26 08:31:17 PDT 2013


i've added this in my html page:

map.addLayer(municipality);

    var mun_wms = new OpenLayers.Layer.WMS(
        "Municipality WMS",
        "http://localhost:8080/geoserver/wms",
        {layers: "new:Municipality", transparent: true},
        {isBaseLayer: false, visibility: false}
    );
    map.addLayers([mun_wms]);

 map.events.register('click', map, function (e) {
        var url =  mun_wms.getFullRequestString({
            REQUEST: "GetFeatureInfo",
            EXCEPTIONS: "application/vnd.ogc.se_xml",
            BBOX: mun_wms.map.getExtent().toBBOX(),
            X: e.xy.x,
            Y: e.xy.y,
            INFO_FORMAT: 'text/html',
            QUERY_LAYERS: mun_wms.params.LAYERS,
            WIDTH: mun_wms.map.size.w,
            HEIGHT: mun_wms.map.size.h});

        window.open(url,
                "getfeatureinfo",
                "location=0,status=0,scrollbars=1,width=600,height=150"
            );
    });

but i recieve this when i click on the map:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM "
http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1" >   <ServiceException
code="InvalidPoint">
      X and Y incorrectly specified
</ServiceException></ServiceExceptionReport>


while this is part of my wms-getcapabilities.xml

<SRS>EPSG:900913</SRS>
   <BoundingBox SRS="*EPSG:900913*" minx="*2504688.5425000004*" miny="*
-5009377.085000001*" maxx="*5009377.085000001*" maxy="*-2504688.5425000004*"/>
   <Resolutions>156543.03390625 78271.516953125 39135.7584765625
19567.87923828125 9783.939619140625 4891.9698095703125 2445.9849047851562
1222.9924523925781 611.4962261962891 305.74811309814453 152.87405654907226
76.43702827453613 38.218514137268066 19.109257068634033 9.554628534317017
4.777314267158508 2.388657133579254 1.194328566789627 0.5971642833948135
0.29858214169740677 0.14929107084870338 0.07464553542435169
0.037322767712175846 0.018661383856087923 0.009330691928043961
0.004665345964021981 0.0023326729820109904 0.0011663364910054952
5.831682455027476E-4 2.915841227513738E-4 1.457920613756869E-4</Resolutions>
   <Width>256</Width>
   <Height>256</Height>
   <Format>image/jpeg</Format>
   <Layers>new:Municipality</Layers>

What's wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20131026/740af317/attachment.html>


More information about the Users mailing list