Common Custom data source
Common_CustomDataSource_VBNet\REXMLDataSource_VBNet\MapInformation.vb
' Copyright 2010 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See the use restrictions.
' 

Imports Microsoft.VisualBasic
Imports System
Namespace REXMLDataSource_VBNet
    ' The IMapInformation interface provides access to common properties of a map resource.
    Public Class MapInformation
        Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation
#Region "Instance Variable Declarations"

        Private m_dataFrame As String = String.Empty
        Private m_defaultSpatialReference As ESRI.ArcGIS.ADF.Web.SpatialReference.SpatialReference = Nothing
        Private m_tileCacheInfo As ESRI.ArcGIS.ADF.Web.DataSources.TileCacheInfo = Nothing
        Private m_graphicsDataSet As ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsDataSet = Nothing

#End Region

#Region "Constructor"

        Public Sub New(ByVal graphicsDataSet As ESRI.ArcGIS.ADF.Web.Display.Graphics.GraphicsDataSet)
            m_graphicsDataSet = graphicsDataSet
        End Sub

#End Region

#Region "IMapInformation Members"

        Public ReadOnly Property DataFrame() As String Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation.DataFrame
            Get
                Return m_dataFrame
            End Get
        End Property

        Public ReadOnly Property DefaultSpatialReference() As ESRI.ArcGIS.ADF.Web.SpatialReference.SpatialReference Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation.DefaultSpatialReference
            Get
                Return m_defaultSpatialReference
            End Get
        End Property

        Public ReadOnly Property DefaultExtent() As ESRI.ArcGIS.ADF.Web.Geometry.Envelope Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation.DefaultExtent
            Get
                If m_graphicsDataSet Is Nothing Then
                    Return Nothing
                Else
                    Return m_graphicsDataSet.DefaultExtent
                End If
            End Get
        End Property

        Public ReadOnly Property FullExtent() As ESRI.ArcGIS.ADF.Web.Geometry.Envelope Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation.FullExtent
            Get
                If m_graphicsDataSet Is Nothing Then
                    Return Nothing
                Else
                    Return m_graphicsDataSet.FullExtent
                End If
            End Get
        End Property

        Public Property TileCacheInfo() As ESRI.ArcGIS.ADF.Web.DataSources.TileCacheInfo Implements ESRI.ArcGIS.ADF.Web.DataSources.IMapInformation.TileCacheInfo
            Get
                Return m_tileCacheInfo
            End Get
            Set(ByVal value As ESRI.ArcGIS.ADF.Web.DataSources.TileCacheInfo)
                m_tileCacheInfo = Value
            End Set
        End Property

#End Region
    End Class
End Namespace