[Mapserver-users] Autonumbering of labels?

Lowell Filak lfilak at medinaco.org
Mon Jun 7 10:45:41 EDT 2004


The following message was sent by Doug <ummmmm at myrealbox.com> on Mon, 07
Jun 2004 08:39:46 -0500.

> Steve Lime wrote:
> 
> > Nope, that functionality doesn't exist. For clarification, you mean only
> > the 
> > features actually labeled? That may be tough because labels are
> > assigned before
> > being queued for rendering and this would need to be far more dynamic.
> > 
> > If you could expand on your idea that would help...
> > 
> > Steve
> > 
> > 
> >>>>Brad Cantwell <bcantwel at us.ibm.com> 6/3/2004 1:56:37 PM >>>
> > 
> > 
> > Is there a way to do sequential numbering for labels?  We would like
> > to
> > have the labels for features autonumbered (i.e. 1 though N).  Is there
> > a
> > way to do this through the .map file?    We are trying to avoid
> > MapScript
> > if possible.
> 
> I work with Brad, and here's what we need to do.  We have a layer of 
> specific locations that we need to show on the drawn map.  However, we 
> need the locations to be numbered somehow such that for any particular 
> map, the numbers always start at 1.  i.e. dynamically giving a temporary 
> "ID" to each location based on what is currently visible.
> 
> One person suggested creating a dynamic database view with an 
> autonumbered column, but we haven't succeeded with that approach yet. 
> We were also wondering if there are other options.
> 
> Doug

I know your trying to stay away from MapScript but I would suspect with
it you could do a queryByRect (current extents) on the points layer and
then loop through the resultCacheObj for each resultCacheMemberObj
grabbing the shapeindex for the current point and create a pointObj for
that shapeindex in the layer and then use the pointObj draw method
specifying the 'character text' value as the sequential number.
Clear as mud...

Lowell



More information about the mapserver-users mailing list