[mapserver-users] PHP/Mapscript Question
Stephen Woodbridge
woodbri at swoodbridge.com
Thu Feb 14 20:07:37 PST 2002
OK, here is an update. I can get the marker symbol to show up BUT not
text label using the following code in my GMapDrawMap(). Does anyone
have any ideas why?
if ($gbShowQueryResults)
$img = $gpoMap->drawQuery();
else
$img = $gpoMap->draw();
if ($HTTP_FORM_VARS["mx"] && !$gbShowQueryResults)
{
$dfmx = doubleval($HTTP_FORM_VARS["mx"]);
$dfmy = doubleval($HTTP_FORM_VARS["my"]);
$sfmtxt = $HTTP_FORM_VARS["mtxt"];
$mlayer = $gpoMap->getlayerbyname("marker");
if (isset($mlayer)) {
$mlayer->set("status", 1);
$point = ms_newPointObj();
$point->setXY($dfmx, $dfmy);
$point->draw($gpoMap, $mlayer, $img, 0, $sfmtxt);
}
}
$url = $img->saveWebImage($gAppletImgFmt, 0, 0, -1);
> where layer marker in my map file would be defined like:
>
> LAYER
> NAME marker
> TYPE POINT
> STATUS OFF
> CLASS
> NAME "User Marker"
> #TEXT "HERE"
> SYMBOL 'marker'
> COLOR 0 0 0
> LABEL
> FORCE TRUE
> TYPE TRUETYPE
> FONT arial-bold
> BUFFER 4
> SIZE 8
> POSITION AUTO
> COLOR 0 0 0
> BACKGROUNDCOLOR 255 255 204
> END
> END
> #FEATURE
> # POINTS x y
> #END
> END
Thanks,
-Steve Woodbridge
More information about the MapServer-users
mailing list