[Mapserver-users] layerObj
mountainduo at mho.com
mountainduo at mho.com
Wed Mar 3 10:07:37 PST 2004
Hello,
I am working on java and mapscript. I have a dll and can create a map when
i have the layers already turned on. Now i am trying to use the layerObj
to change the status of a layer so it will display.
here is the problem... When i call the function natively from java i
always get EXCEPTION_ACCESS_VIOLATION. it seems that the layer is not in
memory. I know that it finds it from getLayerByName function. The problem
actually occurs in every function that tries to get or set something in
the layerObj.
here is section from mapscript_wrap.c and i would appreciate if you have
any comments or suggestions to help get this to work:
JNIEXPORT void JNICALL
Java_edu_umn_gis_mapscript_mapscriptJNI_set_1layerObj_1status(JNIEnv
*jenv, jclass jcls, jlong jarg1, jint jarg2) {
layerObj *arg1 = (layerObj *) 0 ;
int arg2 ;
(void)jenv;
(void)jcls;
arg1 = *(layerObj **)&jarg1;
arg2 = (int)jarg2;
printf( "ok before setting status\n" );
if (arg1) (arg1)->status = arg2;
}
thanks,
will
More information about the MapServer-users
mailing list