Closed misart closed 11 years ago
I'm guessing you still get an output image but it has AAA
instead of BBB
? Or is there some other kind of failure? I know you posted your version information above, but can you please post the output from:
var mapserv = require('mapserv');
console.log(mapserv.versions);
Thanks.
I'm guessing you still get an output image but it has AAA instead of BBB
Yes, I get image with label AAA from node-mapserv, but if I execute this:
mapserv -nh "demo.map&mode=map" >test.png
... then I get image with proper label BBB.
My version from node: { node_mapserv: '0.1.0', mapserver: '6.2.0', mapserver_details: 'MapServer version 6.2.0 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE' }
Thanks. I've looked into this and it appears to be a bug in the underlying mapserver library. I have fixed this and issued a pull request: mapserver/mapserver/pull/4593. Patching your mapserver installation with this fix should solve your issue.
This patch fixes the msCopyLabel
function, which is called by msCopyMap
. node-mapserv
calls msCopyMap
on each rendering request to copy the original C mapObj
data structure. This is necessary because mapserver can alter the mapObj
when processing a request.
Text "BBB" in the Label section should override the text "AAA" in Class section, but it doesn't. Please check example below:
System: Ubuntu 12.04 MapServer: version 6.2.0 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE