Tamas,
        Thanks for the suggestion but the layerObj does not contain and
UpdateFromString property or method (when viewed from Visual Studio's object
browser nor when viewing the API reference online).  Thoughts?

Brian

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tamas Szekeres
Sent: Tuesday, April 01, 2008 4:48 PM
To: Hulbert, Brian
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] Unable to access Grid Object (GridObject) via
C# MapScript interface (related to bug 1980)

You can probably use layerObj.UpdateFromString with the string you
have in your mapfile. However I'm not sure how you loose your settings
after the first refresh? Do you recreate your map by using Clone() or
something?
We should also fix msCopyLayer to copy the layerinfo with the graticule
layers.


Best regards,

Tamas



2008/4/1, Hulbert, Brian <[EMAIL PROTECTED]>:
>
>
>
>
> I have a MAP file that contains a layer for displaying graticule (see
> below).  However, after the first refresh, the labelformat for my grid
> object is lost.  This was noted in bug 1980.  I cannot find a workaround
for
> this bug by traversing the layer->class object hierarchy and trying to set
a
> labelformat for the GridObject.
>
>
>
> Can the label format be reset via the mapscript_csharp dll interface?  If
> not, is drawing the graticule lines better accomplished via a shape file?
> Even if I need to do both a equirectangular and orthographic projections?
>
>
>
> Ref: I am using MapScript 5.0.2 and calling it from C# using MS VS 2005
>
>
>
> LAYER
>
>    NAME "grid"
>
>    METADATA
>
>      "DESCRIPTION" "Grid"
>
>    END
>
>    TYPE LINE
>
>    STATUS ON
>
>
>
>    PROJECTION
>
>       'proj=longlat'
>
>       'ellps=WGS84'
>
>       'datum=WGS84'
>
>       'no_defs'
>
>    END
>
>
>
>    CLASS
>
>      NAME "Graticule"
>
>      COLOR 192 192 192
>
>      LABEL
>
>        COLOR  255 255 0
>
>        FONT arial
>
>        TYPE truetype
>
>        SIZE 8
>
>        POSITION AUTO #ur
>
>        PARTIALS FALSE
>
>        BUFFER 5
>
>      END
>
>   END
>
>
>
>   GRID
>
>     LABELFORMAT "%g°"  # dec degrees with symbol
>
>     MAXARCS 10
>
>     MAXINTERVAL 10
>
>     MAXSUBDIVIDE 64
>
>   END
>
> END # Layer
>
>
> _______________________________________________
>  mapserver-users mailing list
>  mapserver-users@lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to