should (classObj.getLabel() == null) when MAP.LAYER.CLASS has no LABEL ?
rich.fromm
nospam420 at YAHOO.COM
Wed Jan 9 17:41:12 PST 2008
Within each MAP.LAYER.CLASS in my *.map files, some classes have a LABEL, but
many do not. My guess had been that when parsing the classObj in Java
mapscript, that if there was no LABEL, that classObj.getLabel() would return
a
null labelObj. This is not the case. A non-null labelObj is returned
whether
or not there is a LABEL.
Is this intended behavior, or a bug?
There's no way to tell from the mapscript docs, as getLabel() isn't even
listed in "classObj Methods". (Which I guess is a minor documentation bug
regardless.)
If I look at the classObj.java source, it shows:
--- begin ---
public labelObj getLabel() {
long cPtr = mapscriptJNI.get_classObj_label(swigCPtr);
return (cPtr == 0) ? null : new labelObj(cPtr, false);
}
--- end ---
I don't totally understand all of the SWIG stuff, but I would guess from
looking at it that it ought to be returning null if not applicable. But it
doesn't appear to be doing that.
--
View this message in context: http://www.nabble.com/should-%28classObj.getLabel%28%29-%3D%3D-null%29-when-MAP.LAYER.CLASS-has-no-LABEL---tp14726078p14726078.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list