mapscript set connectiontype
listuser HH
listuser at HERZSYS.DE
Wed Aug 17 06:29:17 PDT 2005
robert fritz wrote:
> Hello,
>
> i try to set the "connectiontype" property of one layer using
> mapscript php
>
> …
>
> $objLayer->set('connectiontype','OGR');
>
> $objLayer->set('connection',$oldData);
>
> $objLayer->set('data',$strNewData);
>
> …
>
> The "connection" and "data" properties were set but the
> "connectiontype" property is not. The layer is not drawn, but I do not
> get any error message. I saved the dynamically changed map-file and
> there is no property "connectiontype" in the layer-definition.
>
> If I try to set the property in this way
>
> …
>
> $objLayer->set('connectiontype', 0);
>
> …
>
> the layer is not drawn, but if I take this
>
> …
>
> $objLayer->set('connectiontype', 1);
>
> …
>
> I get a PHP Warning PHP Warning:
>
> [MapServer Error]: msDrawMap(): Failed to draw layer named 'FS'.
>
> So, what I'm doing wrong?
>
> Thanks, Robert
Hi,
you should use the MS_* defininitions. Have a look at:
http://ms.gis.umn.edu/docs/reference/mapscript/index_html#mapscript-variables
Regards,
Norbert
More information about the MapServer-users
mailing list