Product: MapX
Version: 3.52
Platform: Window NT40
Category: ODBC
Summary:
SrvLayerOptions argument in AddServerLayer statement.
Question:
What is the syntax for the SrvLayerOptions argument in the AddServerLayer statement?
Answer:
The 5th Argument in the AddServerLayer statement is the SrvLayerOptions argument. This allows control of certain behavior of a server layer (presently the cache and the mbrsearch options). It does not take a Boolean. It takes a set of flags (bitmask) as described below. Use the enumerated values provided and simply OR them together to define the SrvLayerOptions value before calling the AddServerLayer statement.
Here is a Visual Basic code sample:
Dim SrvLayerOptions As Integer
' set the SrvLayerOrder argument to put this new layer on top
SrvLayerOrder=1
' init the SrvLayerOptions flag to all 0
SrvLayerOptions = 0
' set the cache option
If chkCache.Value = vbUnchecked Then
SrvLayerOptions = SrvLayerOptions Or miLayerCacheOff
Else
SrvLayerOptions = SrvLayerOptions Or miLayerCacheOn
End If
' set the mbrsearch option
If chkMBRSearch.Value = vbUnchecked Then
SrvLayerOptions = SrvLayerOptions Or miLayerMBRSearchOff
Else
SrvLayerOptions = SrvLayerOptions Or miLayerMBRSearchOn
End If
' MapX 3.51 syntax
g_map.Layers.AddServerLayer TabName.Text, ConnectString.Text, QueryString.Text, SrvLayerOrder, SrvLayerOptions
' MapX 3.5 syntax
'g_map.Layers.AddServerLayer TabName.Text, ConnectString.Text, QueryString.Text
Last Modified: 06/03/1999 10:03:29 AM
|