Here are some ideas... I would add 900913 to wms_srs. If that doesn't solve the problem keep it there, it has to be there. "wms_srs" "EPSG:4326 EPSG:900913"
Add this in the MAP section of your mapfile to make sure it read the good epsg file. this is an example of a path to the epsg file CONFIG "PROJ_LIB" "/srv/www/services/epsg/" Perhaps you need to add the definition of 900913 to proj4 used by OpenLayers create epsg900913.js, with this in Proj4js.defs["EPSG:900913"]= "+title= Google Mercator EPSG:900913 +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"; Make sure to add this script after loading proj4.js Dejan Gambin <dejan.gam...@coin.hr>@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2014-02-13 08:06 A mapserver-users@lists.osgeo.org cc Objet [Polluriel potentiel] Re: [mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with different projections Since I didn't solve this yet, do you think it could be a bug and/or should I try with some newer MapServer version? I am currently using 6.0.3 Thx Dejan Gambin On 22. sij. 2014., at 10:35, Dejan Gambin wrote: > Sorry for being late... > > So, I have tested it all with browser of course. Here are some working and non-working requests: > > Mapfile part: > > PROJECTION > "init=epsg:4326" > END > METADATA > "wms_srs" "EPSG:4326" > "wms_title" "aster_dem" > "gml_include_items" "value_0" > "gml_value_0_alias" "Nadmorska_visina" > END > TILEINDEX "../aster/aster_index" #original raster in 4326 > > > Working GetMap request in 900913: > > http://mydomain.com/cgi-bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:900913&FORMAT=image/png&WIDTH=400&HEIGHT=300&BBOX=1496080.301904,5576310.226428,1593919.698096,5649689.773572 > > Non-working GetFeatureInfo request in 900913: > > http://mydomain.com/cgi-bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:900913&FORMAT=image/png&WIDTH=400&HEIGHT=300&BBOX=1496080.301904,5576310.226428,1593919.698096,5649689.773572&QUERY_LAYERS=aster_dem_info&INFO_FORMAT=gml&X=200&Y=100 > > Working GetMap request in 4326: > > http://mydomain.com/cgi-bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:4326&FORMAT=image/png&WIDTH=400&HEIGHT=300&BBOX=13.439518,44.712096,14.318424,45.178647 > > Working GetFeatureInfo request in 4326: > > http://mydomain.com/cgi-bin/mywms/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=aster_dem_info&STYLES=&SRS=EPSG:4326&FORMAT=image/png&WIDTH=400&HEIGHT=300&BBOX=13.439518,44.712096,14.318424,45.178647&QUERY_LAYERS=aster_dem_info&INFO_FORMAT=gml&X=200&Y=100 > > > > > > > On 17. sij. 2014., at 13:52, Rahkonen Jukka (Tike) wrote: > >> Hi, >> >> Please show us the complete GetFeatureInfo requests for both cases. Server urls are not interesting but all the WMS parameters. Have you already tried to send them from browser? Testing with OpenLayers is waste of time because you can't control what really happens but with hand written requests you are the master. >> >> -Jukka Rahkonen- >> >> >> Lars Lingner wrote: >>> >>> On 17.01.2014 11:10, Dejan Gambin wrote: >>>>> What is the mywms? MapServer binary, wrapper script, ...? >>>> wrapper script. Something like: >>>> >>>> #! /bin/sh MS_MAPFILE=/path_to_my_map_file export MS_MAPFILE >>>> /usr/lib/cgi-bin/mapserv6 >>>> >>> >>> AFAIK nothing wrong here. >>> >>>>> >>>>> Did you check the actual requests? Does the bbox parameter fit to >>>>> the srs? Could you compare a working GetFeatureInfo request in >>>>> 900913 with a failing one in 4326? >>>> Yes, bbox parameter fits to srs in both cases. So, if I put bbox/srs >>>> params in 426 everything works, if I put them in 900913 then error >>>> happens >>> >>> Does other maps work with 900913? >>> >>> I would check which pro4 epsg file mapserver is using, check if there is >>> a definition for 90013 and if it looks like >>> >>> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 >>> +k=1.0 +units=m +nadgrids=@null +wktext +no_defs >>> >>> On the other hand, if GetMap ist working fine, projection definition >>> should be fine too. Just thinking out loud... >>> >>> >>>>> >>>>> Raise the debug level to 3 at map level and layer level. You can >>>>> let MapServer write its own error logfile, so your apache log stays >>>>> clean. >>> >>> Could you find anything in the MapServer log file? >>> >>> Here I would identify a working 4326 GFI request and compare the >>> corresponding log with a 900913 request. There should be a difference. >>> >>> >>> Best wishes, >>> >>> Lars >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users@lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > _______________________________________________ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users