[Mapserver-users] Autonumbering of labels?

Doug ummmmm at myrealbox.com
Mon Jun 7 09:24:25 PDT 2004


Lowell Filak wrote:

> 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

The reason we're trying to stay away from MapScript is the thread safety 
issues we've been reading about.  That and the fact that we do all of 
our application coding in Java, for which there doesn't appear to be any 
standard, accepted implementation.

So how to people use MapScript anyway if it's not thread safe?  Always 
as separate CGI processes?

Doug



More information about the MapServer-users mailing list