Imports ThinkGeo.MapSuite.Core Imports ThinkGeo.MapSuite.WebEdition Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If (Not Page.IsPostBack) Then Map1.MapBackground.BackgroundBrush = New GeoSolidBrush(New GeoColor(255, 239, 213)) Map1.MapUnit = GeographyUnit.DecimalDegree cargaDeCapas() Map1.MapTools.PanZoomBar.Enabled = True Map1.ToolTip = "Haz click para ver la informacion del objeto" End If End Sub Private Sub cargaDeCapas() Dim Autopistas As New ShapeFileFeatureLayer(MapPath("~\Mapas\espes2________00.shp")) Autopistas.FeatureSource.Projection = New Proj4Projection(23030, 23030) Autopistas.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = EstAutopista(1, 3) Autopistas.ZoomLevelSet.ZoomLevel02.DefaultLineStyle = EstAutopista(1, 3) Autopistas.ZoomLevelSet.ZoomLevel03.DefaultLineStyle = EstAutopista(1, 3) Autopistas.ZoomLevelSet.ZoomLevel04.DefaultLineStyle = EstAutopista(200, 400) Autopistas.ZoomLevelSet.ZoomLevel05.DefaultLineStyle = EstAutopista(2, 4) Autopistas.ZoomLevelSet.ZoomLevel06.DefaultLineStyle = EstAutopista(3, 5) Autopistas.ZoomLevelSet.ZoomLevel07.DefaultLineStyle = EstAutopista(3, 6) Autopistas.ZoomLevelSet.ZoomLevel08.DefaultLineStyle = EstAutopista(55, 60) Autopistas.ZoomLevelSet.ZoomLevel09.DefaultLineStyle = EstAutopista(60, 65) Autopistas.ZoomLevelSet.ZoomLevel10.DefaultLineStyle = EstAutopista(70, 75) Autopistas.ZoomLevelSet.ZoomLevel11.DefaultLineStyle = EstAutopista(75, 80) Autopistas.ZoomLevelSet.ZoomLevel12.DefaultLineStyle = EstAutopista(80, 85) Autopistas.ZoomLevelSet.ZoomLevel13.DefaultLineStyle = EstAutopista(85, 90) Autopistas.ZoomLevelSet.ZoomLevel14.DefaultLineStyle = EstAutopista(1, 3) Autopistas.ZoomLevelSet.ZoomLevel15.DefaultLineStyle = EstAutopista(95, 100) Autopistas.ZoomLevelSet.ZoomLevel16.DefaultLineStyle = EstAutopista(100, 105) Autopistas.ZoomLevelSet.ZoomLevel17.DefaultLineStyle = EstAutopista(105, 110) Autopistas.ZoomLevelSet.ZoomLevel18.DefaultLineStyle = EstAutopista(110, 115) Autopistas.ZoomLevelSet.ZoomLevel19.DefaultLineStyle = EstAutopista(115, 120) Autopistas.ZoomLevelSet.ZoomLevel20.DefaultLineStyle = EstAutopista(125, 150) Map1.StaticOverlay.Layers.Add("Autopistas", Autopistas) Autopistas.Open() Map1.CurrentExtent = Autopistas.GetBoundingBox Autopistas.Close() End Sub Private Function EstAutopista(ByVal AnchuraInt As Integer, ByVal AnchuraExt As Integer) As LineStyle Dim estiloPropio As LineStyle Dim linExterior As GeoPen Dim linInterior As GeoPen linExterior = New GeoPen(New GeoColor(255, 0, 0), AnchuraExt) linInterior = New GeoPen(New GeoColor(255, 242, 0), AnchuraInt) estiloPropio = New LineStyle(linExterior, linInterior) Return estiloPropio End Function End Class