[mapserver-users] ms_newLayerObj (fwd)
teb
teb at mallit.fr.umn.edu
Mon Oct 8 07:50:05 PDT 2001
------------- Begin Forwarded Message -------------
From: Øyvind Idland <oyvind.idland at powelgemini.no>
To: <mapserver-info at lists.gis.umn.edu>
Subject: ms_newLayerObj
Date: Mon, 8 Oct 2001 16:18:32 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by mallit.fr.umn.edu id JAA14289
Hello
I am currently testing Mapscript 3.4 with php 4.05, running as cgi under IIS.
Since I want to use points/objects from a database (via odbc), i want to create
layers on the fly. For some reason, the layer refuses to draw.
I used following lines:
$map = ms_newMapObj("C:\inetpub\wwwroot\oi\oi.map");
$newlay = ms_newLayerObj($map);
$newlay->set("name", "db_layer");
$newlay->type = MS_LAYER_POINT;
$newlay->status = MS_ON;
$newclass = ms_newClassObj($newlay);
$newclass->outlinecolor = 0;
$newclass->symbol = 3;
$newclass->size = 10;
and then the nessesary database / point adding stuff.
(This works fine if I define the layer in the .map file)
There are already 2 other layers on the map, so this is the 3rd layer.
$map->numlayers returns 2, (there should be 3 ?) and $newlay->index returns 1.
Is this a bug ? :)
Anyway, thanks for a powerful tool.
Oyvind Idland, Powel Gemini A/S
mailto:oyvind.idland at powelgemini.no
------------- End Forwarded Message -------------
More information about the MapServer-users
mailing list