ThinkGeo.com    |     Documentation    |     Premium Support

Make a layer visible starting with level 10

Hi,

i understood that i can use the layers ZoomLevelSet to control how features are rendered at specific zoom-level. What i didn’t find was a way to define that a feature is “invisible” up to a specific Zoomlevel and then gets displayed.

Any help is appreciated.

Regards,
Andreas

Hi Andreas,

We don’t set the visible or invisible for a feature, we just set them for a layer.

If you have a feature need be special handled, please just add it to a special layer.

You want this layer be rendered in which level, you can just set the style for this level. If you hadn’t set correct style for the level of a layer, nothing will be rendered.

Regards,

Don

Hi Don,

i tried the following:

        oracleLayer2.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = null;
        oracleLayer2.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10;
        oracleLayer2.ZoomLevelSet.ZoomLevel02.DefaultLineStyle = LineStyles.Highway1;
        oracleLayer2.ZoomLevelSet.ZoomLevel02.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

and i expected that i see nothing from Level 1-10 and when i zoom in to level 11 and above the features of the layer will be displayed.
But it doesn’t work. The features are always visible.

Any idea?

Regards,
Andreas

Hi Andreas,

Please set like this:

oracleLayer2.ZoomLevelSet.ZoomLevel11.DefaultLineStyle = LineStyles.Highway1;
oracleLayer2.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

And I think you should want download our HowDoISamples project, which contains many sample code.

Regards,

Don

Hi Don,

thanks for your help.

I already downloaded the HowDoISampes-project and get a lot of hints from it.

Regards,
Andreas

Hi Andreas,

I am glad to hear that’s helpful.

Any question please let us know.

Regards,

Don