Saturday 16 March 2013

MapGuide tidbits: scale range gotcha

Here's a little gotcha to be aware of.

Consider this Layer Definition



Do you think this layer covers all scales from 0 to 15000?

For those who thought not, you can stop reading this post now :)

Otherwise read on.

The layer above does not actually cover all scales from 0 to 15000 because the stylizer only considers a view to be in a given scale range if the scale is greater than or equal to the minimum scale and less than the maximum scale of that scale range

ie. Your view scale is applicable for this range if: min scale <= view scale < max scale

This means for a view scale of 5000 or 10000, you actually have no matches according to the stylizer and nothing from that layer will be rendered out.

This isn't much of a big deal for a Map Definition full of dynamic layers, but for Map Definitions with tiled layers, this can be a problem. One or more of your finite scales may be off by 1 and nothing is actually rendered in your map tiles as a result.

So remembering the range check as stated above helps.

No comments: