Choice of Visible Layers

TatukGIS Internet Server LITE Samples

Choose visible layers:

Source code    Project files

This sample uses the TatukGIS Internet Server LITE to internet publish vector street map coverage's and a TatukGIS PixelStore format image layer. The data used for this sample is similar to that in the prior sample except that the image layer is a TatukGIS PixelStore file, as opposed to the "TIFF" image file used in the prior sample. The TatukGIS PixelStore format is an SQL based virtual tiled image hierarchy system that offers top speed with even the largest image files.

Refer to the TatukGIS web site for information on the advantages of the PixelStore format. The TatukGIS free Viewer may be used to create a PixelStore image file.

This sample demonstrates how to select which layer(s) are to be visible in the map presentation. Options are to present only the image layer or the SHP format vectors or both image and vectors together. It is important to name the layers in the project file and use the function LayerActive("layer") in the proper way with the names given to the layers.


washington2.aspx    Top

                    
                    
<%@ Page Language="VB" Debug="True" %>
<%@ Register TagPrefix="ttkGIS" Namespace="TatukGIS.IS" Assembly="TatukGIS.IS" %>
<script runat="server">

    Sub GIS_FullExtent_Click(sender As Object, e As ImageClickEventArgs)
        GIS.FullExtent
    End Sub
    
    Sub GIS_ZoomIn_Click(sender As Object, e As ImageClickEventArgs)
        GIS.ZoomIn
    End Sub
    
    Sub GIS_ZoomOut_Click(sender As Object, e As ImageClickEventArgs)
        GIS.ZoomOut
    End Sub
    
    Sub GIS_Smaller_Click(sender As Object, e As ImageClickEventArgs)
        GIS.Width  = Unit.Pixel( GIS.Width.Value  - 54 )
        GIS.Height = Unit.Pixel( GIS.Height.Value - 40 )
    End Sub
    
    Sub GIS_Larger_Click(sender As Object, e As ImageClickEventArgs)
        GIS.Width  = Unit.Pixel( GIS.Width.Value  + 54 )
        GIS.Height = Unit.Pixel( GIS.Height.Value + 40 )
    End Sub
    
    Sub GIS_Load(sender As Object, e As EventArgs)
        GIS.Open( Page.MapPath( "data/washington2.ttkgp" ) )
    End Sub
    
    Sub GIS_BeforePaint(sender As Object, e As PaintEventArgs)
        GIS.SetLayerActive("photo", False)
        GIS.SetLayerActive("water", False)
        GIS.SetLayerActive("lines", False)
        GIS.SetLayerActive("water_labels", False)
        if RadioButtonDOQQ.Checked then
            GIS.SetLayerActive("photo", True)
        end if
        if RadioButtonTiger.Checked then
            GIS.SetLayerActive("water", True)
            GIS.SetLayerActive("lines", True)
            GIS.SetLayerActive("water_labels", True)
        end if
        if RadioButtonBoth.Checked then
            GIS.SetLayerActive("photo", True)
            GIS.SetLayerActive("water", True)
            GIS.SetLayerActive("lines", True)
            GIS.SetLayerActive("water_labels", True)
        end if
    End Sub
</script>
<html>
<head>
    <link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <a name="top"> 
    <h1>Choice of visible layers 
    </h1>
    <h2 class="comment">TatukGIS IS LITE Sample 
    </h2>
    <form runat="server">
        <p>
            <asp:Table id="Table1" runat="server" Width="360px" BackColor="#E9E9E9">
                <asp:TableRow>
                    <asp:TableCell ColumnSpan="3">
                        <asp:Label runat="server" id="Label1" cssclass="bold">Choose visible layers: </asp:Label> 
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell Width="120px">
                        <asp:RadioButton runat="server" GroupName="Map" AutoPostBack="True" Text="DOQQ photos" ID="RadioButtonDOQQ"></asp:RadioButton>
                    </asp:TableCell>
                    <asp:TableCell Width="120px">
                        <asp:RadioButton runat="server" GroupName="Map" AutoPostBack="True" Text="TIGER vectors" ID="RadioButtonTiger"></asp:RadioButton>
                    </asp:TableCell>
                    <asp:TableCell Width="120px">
                        <asp:RadioButton runat="server" GroupName="Map" AutoPostBack="True" Text="Both" Checked="True" ID="RadioButtonBoth"></asp:RadioButton>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </p>
        <p>
            <table cellspacing="0" cellpadding="0" border="0">
                <tbody>
                    <tr>
                        <td>
                            <asp:ImageButton id="GIS_FullExtent" onclick="GIS_FullExtent_Click" runat="server" ImageUrl="/TatukGIS_IS8/img/fullextent.gif"></asp:ImageButton>
                            <asp:ImageButton id="GIS_ZoomIn" onclick="GIS_ZoomIn_Click" runat="server" ImageUrl="/TatukGIS_IS8/img/zoomin.gif"></asp:ImageButton>
                            <asp:ImageButton id="GIS_ZoomOut" onclick="GIS_ZoomOut_Click" runat="server" ImageUrl="/TatukGIS_IS8/img/zoomout.gif"></asp:ImageButton>
                        </td>
                        <td align="right">
                            <asp:ImageButton id="GIS_Smaller" onclick="GIS_Smaller_Click" runat="server" ImageUrl="/TatukGIS_IS8/img/smaller.gif"></asp:ImageButton>
                            <asp:ImageButton id="GIS_Larger" onclick="GIS_Larger_Click" runat="server" ImageUrl="/TatukGIS_IS8/img/larger.gif"></asp:ImageButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <p>
                                <ttkGIS:XGIS_VIEWERIS id="GIS" runat="server" Width="360px" BorderWidth="1px" BorderColor="CornflowerBlue" OnLoad="GIS_Load"></ttkGIS:XGIS_VIEWERIS>
                            </p>
                        </td>
                    </tr>
                </tbody>
            </table>
        </p>
        <p>
        </p>
    </form>
    </a> 
</body>
</html>

                    

washington2.ttkgp    Top

                    
                    
[TatukGIS]

[TatukGIS Layer1]
Path=wash_center.ttkps
name=photo


[TatukGIS Layer2]
path=water.shp
name=water
visible=False

[TatukGIS Layer2 1]
MinZoom=0
Visible=true
Area.Color=82:175:252
Area.OutlineColor=82:175:252


[TatukGIS Layer3]
path=lines.shp
name=lines
Visible=false

'rivers
[TatukGIS Layer3 1]
MinZoom=0
Visible=true
Query=CFCC LIKE 'H1%'
Line.Color=82:175:252
Line.Width=30

'roads 1 
[TatukGIS Layer3 2]
MinZoom=0.0
MaxZoom=3.0
Visible=true
Query=((CFCC LIKE 'A1%') or (CFCC LIKE 'A2%'))
Line.Style=solid
Line.Width=30
Line.Color=yellow
Line.OutlineColor=100:100:100
Line.OutlineWidth=-1
Label.Field=NAME
Label.Alignment=Follow
Label.Position=MiddleCenter
Label.OutlineWidth=0
Label.Font.Size=10
Label.Font.Style=bold
Label.Font.Color=yellow
Label.Color=black
Label.Width=2000
Label.SmartSize=2000

'roads 1
[TatukGIS Layer3 3]
MinZoom=3.0
Visible=true
Query=((CFCC LIKE 'A1%') or (CFCC LIKE 'A2%'))
Line.Style=solid
Line.Width=50
Line.Color=yellow
Line.OutlineColor=100:100:100
Line.OutlineWidth=-1
Label.Field=NAME
Label.Alignment=Follow
Label.Position=MiddleCenter
Label.OutlineWidth=0
Label.Font.Size=10
Label.Font.Style=bold
Label.Font.Color=yellow
Label.Color=black
Label.Width=2000
Label.SmartSize=2000

'roads 2
[TatukGIS Layer3 4]
MinZoom=0
MaxZoom=3.0
Visible=true
Query=(CFCC LIKE 'A3%')
Line.Style=solid
Line.Width=30
Line.Color=240:240:240
Line.OutlineColor=100:100:100
Line.OutlineWidth=-1

'roads 2
[TatukGIS Layer3 5]
MinZoom=3.0
Visible=true
Query=(CFCC LIKE 'A3%')
Line.Style=solid
Line.Width=40
Line.Color=240:240:240
Line.OutlineColor=100:100:100
Line.OutlineWidth=-1
Label.Field=NAME
Label.Alignment=Follow
Label.Position=MiddleCenter
Label.OutlineWidth=0
Label.Font.Size=10
Label.Font.Style=bold
Label.Font.Color=yellow
Label.Color=black
Label.Width=2000
Label.SmartSize=2000

'roads 3
[TatukGIS Layer3 6]
MinZoom=0.4
MaxZoom=3.0
Query=(CFCC LIKE 'A4%') or (CFCC LIKE 'A5%') or (CFCC LIKE 'A6%') or (CFCC LIKE 'A7%')
Visible=true
Line.Style=solid
Line.Width=20
Line.Color=200:220:220

'roads 3
[TatukGIS Layer3 7]
MinZoom=3.0
Query=(CFCC LIKE 'A4%') or (CFCC LIKE 'A5%') or (CFCC LIKE 'A6%') or (CFCC LIKE 'A7%')
Visible=true
Line.Style=solid
Line.Width=30
Line.Color=220:220:220
Label.Field=NAME
Label.Alignment=Follow
Label.Position=MiddleCenter
Label.OutlineWidth=0
Label.Font.Size=8
Label.Font.Style=bold
Label.Font.Color=yellow
Label.Color=black
Label.Width=2000
Label.SmartSize=2000

'railroads 1
[TatukGIS Layer3 8]
MinZoom=0.0
MaxZoom=2.0
Query=(CFCC LIKE 'B%')
Visible=true
Line.Width=25
Line.Color=white
Line.Style=dash
Line.OutlineColor=84:84:84
Line.OutlineWidth=10

'railroads 2
[TatukGIS Layer3 9]
MinZoom=2.0
Query=(CFCC LIKE 'B%')
Visible=true
Line.Width=30
Line.Color=white
Line.Style=dash
Line.OutlineColor=84:84:84
Line.OutlineWidth=10



[TatukGIS Layer4]
path=water_labels.shp
name=water_labels
MinZoom=0.0
Line.Width=0
Label.Field=NAME
Label.Alignment=Follow
Label.OutlineWidth=0
Label.Pattern=Transparent
Label.Font.Size=11
Label.Font.Style=Italic
Label.Font.Color=40:75:118
Label.Color=white
Label.Width=2000
Label.SmartSize=-2000

[TatukGIS Layer50]
path=labels.shp
Marker.Size=0
Label.Field=NAME
Label.Position=MiddleCenter
Label.OutlineWidth=-1
Label.pattern=solid
Label.Font.Size=10
Label.Font.Style=bold
Label.Font.Color=black
Label.Color=white
Label.Width=2000
Label.SmartSize=2000