[OpenLayers-Users] getFeatureInfo projection
Alexandre Dube
adube at mapgears.com
Mon Jul 27 14:06:01 EDT 2009
Lorsque vous utilisez le delete, peser sur "esc" pour désélectionner
tous les features.
Alexandre
Alexandre.Laplante at statcan.gc.ca wrote:
> I'm still stumped on this one. Does anyone know what a Scale of -1
> means? Or a Cellsize of 0? Is openlayers sending the coordinates in
> meters, while mapserver is expecting them in latlon?
>
> Thanks again,
> Alexandre Laplante
>
> -----Original Message-----
> *From:* Laplante, Alexandre - AGRI/AGRI
> *Sent:* July 23, 2009 2:25 PM
> *To:* 'users at openlayers.org'
> *Subject:* FW: [OpenLayers-Users] getFeatureInfo projection
>
> Yeah, I added getName because I have multiple layers, and I needed
> to know which one is being queried. Should have mentioned that.
>
> -----Original Message-----
> *From:* Dave Winfield [mailto:winfield.dave at gmail.com]
> *Sent:* July 21, 2009 12:10 PM
> *To:* Alexandre.Laplante at statcan.gc.ca
> *Subject:* Re: [OpenLayers-Users] getFeatureInfo projection
>
> I'm not totally sure, but what is map.getName() returning?
> You want it to be the layer that's on your wms layer.
>
> On Tue, Jul 21, 2009 at 11:52 AM,
> <Alexandre.Laplante at statcan.gc.ca
> <mailto:Alexandre.Laplante at statcan.gc.ca>> wrote:
>
> Hello,
>
> I have a map in EPSG:42304 projection. I'm trying to have
> a getFeatureInfo return information about clicked
> features, but there are always 0 results. I'm using
> mapserver, and when I use a template header with:
>
> <tr>
> <th>Bounding box</th>
>
> <td>[minx],[miny],[maxx],[maxy]</td>
> </tr>
> <tr>
> <th>Image Coordinates</th>
> <td>[img.x], [img.y]</td>
> </tr>
> <tr>
> <th>Map Coordinates</th>
> <td>[mapx], [mapy]</td>
> </tr>
> <tr>
> <th>Number of results</th>
> <td>[nr]</td>
> </tr>
> <tr>
> <th>Scale</th>
> <td>[scale]</td>
> </tr>
> <tr>
> <th>Cellsize</th>
> <td>[cellsize]</td>
> </tr>
>
> I get back something like:
>
> *Bounding box*
> 1593723.472943,6433235.946381,1740788.283491,6511201.698335
> *Image Coordinates* 227, 115
> *Map Coordinates* 1663128.279584, 6476040.672944
> *Number of results* 0
> *Scale* -1.000000
> *Cellsize* 0.000000
> Is this an issue of projection? What does a scale of -1 mean?
>
> This is the relevent openlayers javascript:
> map.events.register('click', map, function (e) {
>
> OpenLayers.Util.getElement('nodeList').innerHTML =
> "Loading... please wait...";
>
> var url = wms.getFullRequestString({
> REQUEST: "GetFeatureInfo",
> EXCEPTIONS:
> "application/vnd.ogc.se_xml",
> BBOX:
> wms.map.getExtent().toBBOX(),
> X: e.xy.x,
> Y: e.xy.y,
> INFO_FORMAT: 'text/html',
> //QUERY_LAYERS:
> wms.params.LAYERS,
> QUERY_LAYERS: map.getName(),
> WIDTH: wms.map.size.w,
> HEIGHT: wms.map.size.h});
> OpenLayers.loadURL(url, '', this, setHTML);
> OpenLayers.Event.stop(e);
> });
> function setHTML(response) {
> OpenLayers.Util.getElement('nodeList').innerHTML =
> response.responseText;
> }
>
> Thank you,
> Alexandre Laplante
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org <mailto:Users at openlayers.org>
> http://openlayers.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list