[mapserver-users] RE Problem using WMS GetFeatureInfo in OpenLayers with different projections
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Thu Jan 16 05:36:31 PST 2014
In the metadata tag of your layer try set
"wms_srs" "EPSG:4326 EPSG:900913"
Dejan Gambin <dejan.gambin at coin.hr>@lists.osgeo.org
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2014-01-16 05:03
A
mapserver-users at lists.osgeo.org
cc
Objet
[mapserver-users] Problem using WMS GetFeatureInfo in OpenLayers with
different projections
Hi,
I am trying to send WMS GetFeatureInfo request using OL WMSGetFeatureInfo
control. My source data is in 4326 and map is displayed in 900913. I have
something like this in mapfile:
LAYER
NAME "mylayer"
TYPE RASTER
STATUS ON
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_srs" "EPSG:4326"
"wms_title" "whatever"
"gml_include_items" "value_0"
"gml_value_0_alias" "Value 0"
"gml_geometries" "none"
END
OPACITY 0
TILEINDEX "mylayer_index"
TILEITEM "LOCATION"
TEMPLATE void
DUMP true
END
In OL, I am using something like:
var layer = new OpenLayers.Layer.WMS(
'mylayer',
'http://my.domain.com/cgi-bin/mywms?',
{
format:'image/png',
transparent:true,
isBaseLayer:false,
layers:'mylayer'
});
control = new OpenLayers.Control.WMSGetFeatureInfo({
url: "http://my.domain.com/cgi-bin/mywms?",
layers: [layer],
hover: false,
infoFormat: 'gml',
maxFeatures: 1
});
wms_srs in WEB part is "EPSG:900913 EPSG:4326" so it can serve data in
both projections
The problem is - when I click to get the info I get "Internal server
error" and in apache log I get "Segmentation fault" followed by "Premature
end of script headers: mywms"
For test, I reprojected my source rasters to 900913, changed PROJECTION
and wms_srs in LAYER to 900913 and then everything works.
Does anyone know what can be the problem? I am using MapServer 6.0.1 on
debian os.
Thanks for any help
regards, dejan
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140116/af973c59/attachment.htm>
More information about the MapServer-users
mailing list