Opened 16 years ago

Closed 11 years ago

#599 closed enhancement (wontfix)

Set scale ranges by group?

Reported by: andrewd Owned by: jng
Priority: low Milestone: Maestro-5.0
Component: Maestro Version:
Severity: trivial Keywords:
Cc: External ID:

Description

Would it be possible to set scale ranges by groups? Worst case, a user could set a group to be visible from, say, 0 to 20000 - and Maestro could then go through and set all of the Layers in the group to have a Scale Range accordingly...At the moment, if I've got groups with say 10+ layers each, I have to go through each layer manually. Being able to somehow speed that process up would be great.

Change History (12)

comment:1 by ksgeograf, 16 years ago

Are you thinking of selecting a group in the map editor, and setting scales for all layers in that group?

If so, yes, it is possible. But it might have some undesireable sideeffects, as the layers may be used elsewhere. Layers may also have more than one scalerange.

If such a feature was implemented, should it warn users if the layer is part of another map? Or even another group in the map?

How do you propose to handle cases where the layer has multiple scaleranges? (Ignore, Set only first, Delete all but first, Nothing, Force all ranges into the desired range, Something else?)

comment:2 by andrewd, 16 years ago

Yes, I was thinking in the map editor - setting scales for all layers in that group. I know it could have some side effects, but if you gave the user an option like you suggest, I think it would still be useful. It would certainly have been useful for me today, anyway. Ultimately, it would be nicer if you could just set a group to handle the scales, but that's a mapguide issue. This would basically be a workaround until they implement that (if ever).

The safest thing would be to alert the user if the layers are in use elsewhere. Basically, have a max and min field for each group, and when you set that, it adds that scale range to each layer in the group. I suppose editing would be tricky. Like, what if you set the min to 1 and max to 10000, but then wanted to change it to min 1 max 5000? Maybe the simplest thing is to only have it work for layers with a single scale range? That way it could just overwrite any existing scale range...Just thinking out loud here....

comment:3 by ksgeograf, 16 years ago

I think it could work if the user was given an option to do the fixup in-place or copy the layers to a chosen folder.

As for the multiple scales, I agree that MapGuide should eventually be able to handle it. In the meantime, I propose a system like this:

Layer has scale ranges [0:500] and [501:1000]. User selects that the group should only be visible in [200:700]. First layer scale range is truncated to [200:500], second becomes [501:700].

But I don't know what to do if the layer that has scale range [1000:infinity]? Perhaps just remove the range?

comment:4 by andrewd, 16 years ago

I like your proposed method for the 0:500, 501:1000 case, for sure. If someone has a single scale range of 1000:infinity, and they tried to set the scale to something like 200:500, then you'd just have to replace the 1000:infinity with the new one - but you could ask the user what to do, for sure. So, if you had a case like 0:999, 1000:infinity and a desired 500:2000, you'd have to do something like 0:500, 501:2000....so long as you ask the user what to do in cases like that, I think it's a good method.

comment:5 by ksgeograf, 15 years ago

Status: newassigned
Version: 2.0.1

I can't quite visualize the UI, if I get an idea, this should be in 2.0.

comment:6 by ksgeograf, 14 years ago

Milestone: Maestro-2.1

comment:7 by jng, 14 years ago

Milestone: Maestro-2.1Maestro-2.5
Owner: changed from ksgeograf to jng
Status: assignednew

comment:8 by jng, 13 years ago

Milestone: Maestro-3.0Maestro-4.0

comment:9 by jng, 13 years ago

Milestone: Maestro-4.0Maestro-3.5

comment:10 by jng, 13 years ago

Milestone: Maestro-3.5Maestro-4.0

comment:11 by jng, 12 years ago

Milestone: Maestro-4.0Maestro-4.1

comment:12 by jng, 11 years ago

Resolution: wontfix
Status: newclosed

Rather than me trying to solve this problem. Maestro's new embedded IronPython scripting engine lets you be able to solve this yourself.

You basically want something similar to this sample script

That currently works off of all Layer Definitions in a particular folder, but you can easily modify it to operate off of all layers in a Map Definition group instead.

Note: See TracTickets for help on using tickets.