Daniel Morissette wrote:
> Jelmer Baas wrote:
>>
>> Thanks for your quick response. I tried to use OGR:LabelText, and it
>> seems to work -- sometimes. For *some* layers I get this following,
>> quite interesting, error:
>>
>> msDrawMap(): Image handling error. Failed to draw layer named 'topo'.
>> msOGRGetValues(): OGR error. Invalid field index!?!
>>
>
> I checked in the code, and it seems that you'd get that error if
> MapServer tries to read one of the OGR:Label* attributes on a feature
> that does not have a label definition, or in the case of TAB files, on a
> MapInfo object that is not a TEXT object.
>
> I am realizing just now that this makes it impossible to use OGR:Label*
> on a .TAB file that has mixed object types. I think it would be possible
> to make MapServer handle this more gracefully, i.e. returning some
> default values (text="", angle=0 and size=0) in cases where the object
> is not of the right type.

Daniel,

I'm a bit embarrassed, but I just found out that most items I want to show are not labels, but simply text objects. I've figured out that I need to set the layer type to point (which is a bit dirty, since I need to define each layer twice -- once as line and once as point. Are there no other solutions?).

However, this produces a... hmmm... screwed up image. I hosted it at:
http://www.coconline.nl/mapserv.gif - wrong
http://www.coconline.nl/mapserv.png - good

As you can see, it only occurs when I use GIF as an output format. I was using MapServer 4.8.3, just tried 5.0.0 beta4, same effect.

The bad thing is that I use a little trick to provide the things you see as an overlay. As in, I have the normal map and on top of that I present measurements and the so called "as built" and "topo" drawings... I need GIF for this since that bloody IE thing can't handle transparent PNG properly.

Any suggestions? I assume this is a bug in one of the libraries MapServer uses, and I'd be happy to assist tracking it down.

If you want more information, might I suggest you contact me directly on this email address?

--
Jelmer

Reply via email to