Hello anyone have any ideas why I&#39;m not getting features back from the GetFeatureInfo when I use the google hybride as base map?<br><br>thanks!<br><br>alessandro ferrucci<br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 1:17 PM, Alessandro Ferrucci <span dir="ltr">&lt;<a href="mailto:alessandroferrucci@gmail.com">alessandroferrucci@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>I have google hybrid as base map, I have some POI&#39;s that I store in my own postGIS database that I overlay on top of google base map.  I want to attach click mouse handler on POI layer for GetFeatureInfo.  Whenever I click the mouse, I don&#39;t get any features back.  I think it has something to do with projection and mouse location ? ...not quite sure.<br>

<br>Just as an aside, when I view my POI layer using Geoserver&#39;s demo functionality, it gets back all features fine, this is reason I think it has something to do with projection that I attach to my mouse handler or something.<br>

<br>here is relevant code:<br><br>&lt;html&gt;<br><br>    &lt;head&gt;<br>        &lt;title&gt;CIRA GIS&lt;/title&gt;<br>        &lt;script src=&quot;<a href="http://openlayers.org/api/OpenLayers.js" target="_blank">http://openlayers.org/api/OpenLayers.js</a>&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>

        &lt;link rel=&quot;stylesheet&quot; href=&quot;../css/google.css&quot; type=&quot;text/css&quot; /&gt;<br>        &lt;script src=&quot;<a href="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAAo2c5r7VgSxo43IHrZeBAoBQamh927W1qenomYTPDD5XN6kDJqBTSmynWaZ9MUgwOTtaOkIJeFZSMjQ" target="_blank">http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;sensor=true&amp;amp;key=ABQIAAAAo2c5r7VgSxo43IHrZeBAoBQamh927W1qenomYTPDD5XN6kDJqBTSmynWaZ9MUgwOTtaOkIJeFZSMjQ</a>&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>

<br>         &lt;script defer=&quot;defer&quot; type=&quot;text/javascript&quot;&gt;<br><br>function setHTML(response){<br>                document.getElementById(&#39;nodelist&#39;).innerHTML = response.responseText;<br>

            };<br><br>function init()<br>{<br><br>            var options = {<br>                projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>                displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>

                units: &quot;m&quot;,<br>                numZoomLevels: 30,<br>                maxResolution: 156543.0339,<br>                maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),<br>

                controls: []<br>            };<br><br>            var map = new OpenLayers.Map( &#39;map&#39;, options );<br><br>          <br>        var cira_addresses_layer = new OpenLayers.Layer.WMS(<br>            &quot;ACS Addresses&quot;,<br>

            &quot;localhost:8080/geoserver/wms&quot;,<br>            {<br>                layers: &#39;cira:addresses&#39;,<br>                transparent: true<br>            },<br>            {buffer:0, ratio: 1, transitionEffect: &#39;resize&#39;, isBaseLayer: false}<br>

        );<br><br>         var ghyb = new OpenLayers.Layer.Google(<br>            &quot;Google Hybrid&quot;,<br>            {sphericalMercator: true, type: G_HYBRID_MAP, numZoomLevels: 20}<br>        );<br><br><br>            // build up all controls<br>

            map.addControl(new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) }));<br>            map.addControl(new OpenLayers.Control.Navigation());<br>            map.addControl(new OpenLayers.Control.Scale($(&#39;scale&#39;)));<br>

            map.addControl(new OpenLayers.Control.MousePosition({element: $(&#39;location&#39;)}));<br>            map.addControl(new OpenLayers.Control.LayerSwitcher());<br><br>            map.events.register(&#39;click&#39;, map, function (e) {<br>

                    document.getElementById(&#39;nodelist&#39;).innerHTML = &quot;Loading... please wait...&quot;;<br>                    var params = {<br>                        REQUEST: &quot;GetFeatureInfo&quot;,<br>
                        EXCEPTIONS: &quot;application/vnd.ogc.se_xml&quot;,<br>
                        BBOX: map.getExtent().toBBOX(),<br>                        X: e.xy.x,<br>                        Y: e.xy.y,<br>                        INFO_FORMAT: &#39;text/html&#39;,<br>                        QUERY_LAYERS: map.layers[1].params.LAYERS,<br>

                        FEATURE_COUNT: 50,<br>                        Layers: &#39;cira:addresses&#39;,<br>                        Styles: &#39;&#39;,<br>                        Srs: &#39;EPSG:4326&#39;,<br>                        WIDTH: map.size.w,<br>

                        HEIGHT: map.size.h,<br>                        format: &#39;image/jpeg&#39;};<br>                    //updateFeatureInfoFilters(params);<br>                    OpenLayers.loadURL(&quot;<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>&quot;, params, this, setHTML, setHTML);<br>

                    OpenLayers.Event.stop(e);<br>                   // alert(&quot;layer: &quot; + map.layers[1].params.LAYERS);<br>                    alert(&quot;mouse pos: &quot; + e.xy);<br>                });<br><br>

            map.addLayers([ghyb,cira_addresses_layer]);<br><br>            map.zoomToMaxExtent();<br>}<br>        &lt;/script&gt;<br><br>    &lt;/head&gt;<br><br>    &lt;body onload=&quot;init()&quot;&gt;<br>        &lt;div style=&quot;width:100%; height:100%&quot; id=&quot;map&quot;&gt;&lt;/div&gt;<br>

        &lt;div id=&quot;nodelist&quot;&gt;<br>            &lt;em&gt;Click on the map to get feature info&lt;/em&gt;<br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;<br clear="all"><br><br>Thank you very much !<br>

<br>-- <br>Signed,<br><font color="#888888">Alessandro Ferrucci<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Signed,<br>Alessandro Ferrucci<br>