Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MapScriptException for point->draw() when no LABEL defined in LAYER CLASS #4572
Testing an update of PHP mapscript from 6.0.3 to 6.2.0, I ran into this issue. If no LABEL is defined in the LAYER->CLASS, then php mapscript bombs out with (snipped)
Defining an empty
Ewww, can't seem to upload files, will dump code instead, sorry.
$map = ms_newMapObj('test.map'); $img = $map->prepareImage(); $layer = $map->getLayerByName("logo"); $point = ms_newpointobj(); $point->setXY(40, 26); $point->draw($map, $layer, $img, 0, ""); header("Content-type: image/png"); $img->saveImage('');
I think the "problem" is this check in msDrawPoint, if there is no LABEL in the CLASS, then we fail the check and annotext is not set.