[Mapserver-users] Autonumbering of labels?
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jun 7 07:17:56 PDT 2004
Doug,
Part of the problem in doing this has to do with the label cache and how
it treats label collisions and how you want to deal with these. For
example, if I have 2 points in my current map and the are so close
together that one lays on top of the other, the label cache would not
render the second label and therefore you would only have one label on
the map. This is compounded by the fact the you have to assign the
numbers to the labels BEFORE you put them in the cache and you only know
if they have to be removed AFTER the numbers are assigned which will
leave gaps in the number sequences, and you can't cost effectively
re-label the cache when one gets bumped out by a collision.
On the other hand, if you don't care about collisions and are using the
equivalent of FORCE all labels to be drawn then most of the above issues
away.
This is a pretty simple application of mapscript, in fact most virtual
data sources in mapscript do a database query to get the point that
belong in the current map extents and then just cycle through them and
draw and label them on top of the current map image over writing
whatever is under them.
-Steve W.
Doug wrote:
> 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
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list