This project is read-only.

Display layer between scale not works

Sep 19, 2014 at 1:48 PM

I try to display a layer between two scales with the following code
Dim sf As Shapefile = New Shapefile
Dim sFile As String = Dir(RepFondsCarto & "\" & P_FICHIER_CARTO & ".shp")

If (sFile <> "") And sf.Open(RepFondsCarto & "\" & sFile) Then
  Me.CoucheArrets = AxMapCarte.AddLayer(sf, True)

  AxMapCarte.set_LayerMinVisibleScale(Me.CoucheArrets, 0)
  AxMapCarte.set_LayerMaxVisibleScale(Me.CoucheArrets, 25000)
  AxMapCarte.set_LayerDynamicVisibility(Me.CoucheArrets, True)
I watch the current scale using "AxMapCarte.CurrentScale", but the layer is never displaye, even between 0 and 25000.

If I remove the last code line, the layer is displayed in all scales.

How to display the layer between two scales ?

Kind regards.
Sep 29, 2014 at 1:58 PM
Which version of MapWinGIS are you using?
Perhaps you should call set_LayerDynamicVisibility before set_LayerMinVisibleScale?
You can have a look at the Symbology plug-in ( to see how it is used in MapWindow.