[mapserver-users] Unable to access Grid Object (GridObject) via C# MapScript interface (related to bug 1980)

Tamas Szekeres szekerest at gmail.com
Tue Apr 1 13:48:29 PDT 2008


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 <brian.hulbert at linquest.com>:
>
>
>
>
> 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 at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



More information about the MapServer-users mailing list