LABELMAXSCALE on dynamic layer datapoints
Steve Lime
steve.lime at DNR.STATE.MN.US
Thu Jan 26 06:48:52 PST 2006
The addfeature method is a bit more robust since you're assured the dynamic points will be treated exactly like any other layer. With the shape/point draw method there are a few issues (like the one you found) to work around (and document).
Steve
>>> Mark Brooks <mark_brooks at NCSU.EDU> 01/25/06 10:49 PM >>>
Steve,
Thanks for the reply. Good idea on option 1; I'll give that a try.
Regarding your comment on using the add feature capability... is it
better practice to addfeature for a dynamic point as opposed to just draw()?
Thanks again,
Mark
Steve Lime wrote:
> I believe the decision to annotate is computed at a layer level so scales are not checked when you draw at the feature level. I'll have to check the code to be sure about this. There are a couple of options:
>
> 1 - compare the scale values in your code and not send a label string if your about the scale
>
> 2 - use the layer add feature capability to add all the points to the layer and then draw the whole layer
>
> Option 1 is probably the easiest.
>
> Steve
>
>
>
>
>
>>>>Mark Brooks <mark_brooks at NCSU.EDU> 01/25/06 9:03 PM >>>
>
> I've got a layer that I draw dynamically. I query a database, loop
> through the results, create a ms_newPointObj(), setxy() on that new
> point, then draw that point on the map. Works great. In my mapfile, I
> have LABELMAXSCALE set for the dynamic layer. However, it has no effect
> whatsoever on the labeling for the dynamic layer. The labels are always
> shown regardless of the scale. The same method works fine with static
> shape files, just not my dynamic layer. Any suggestions?
More information about the MapServer-users
mailing list