When I load the map , it delays, when I visualize it and on having done 2 or 3 zoom fails (it remains hung) and I do not visualize all the markers of the points of interest
my code:
If
(Not Page.IsPostBack) Then
Map1.BackgroundFillBrush =
New GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"))
Map1.MapUnit = GeographyUnit.DecimalDegree
mapazaragozaa0 =
mapazaragozaa0.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.GetSimpleAreaStyle(GeoColor.FromArgb(255, 243, 239, 228), GeoColor.FromArgb(255, 218, 193, 163), 1)
mapazaragozaa0.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Dim mapazaragozaa0 As ShapeFileLayerNew ShapeFileLayer("C:\ZaragozaAtlas\espes2________a0.shp")
Dim
SetCityMarkers(markerLayer.ZoomLevelSet.ZoomLevel04.Markers)
markerLayer.ZoomLevelSet.ZoomLevel04.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level05
markerLayer As MarkerLayer = New MarkerLayer("DefaultMarkers", GetFeatureSource())
Map1.StaticLayers.Add(
Map1.MarkerLayers.Add(markerLayer)
"MapaZaragozaA0", mapazaragozaa0)
Dim
Map1.ZoomToScale(1000000)
Map1.ScaleLine.Enabled =
zoomLevelSet As ZoomLevelSet = New ZoomLevelSet()True
Map1.PanZoomBar.Enabled =
True
Map1.MousePosition.Enabled =
True
Map1.Overview.Enabled =
True
End If
Private
citiesLayer.Open()
featureSource = citiesLayer.FeatureSource
citiesLayer.Close()
Function GetFeatureSource() As FeatureSourceDim featureSource As FeatureSourceDim citiesLayer As ShapeFileLayer = New ShapeFileLayer("C:\ZaragozaAtlas\espes2________pi.shp")Return featureSourceEnd Function
featureSource.Open()
featureSource.Close()
marker.Popup.ContentHtml =
marker.Popup.Width = 160
marker.Popup.Height = 40
markers.Add(marker)
Private Sub SetCityMarkers(ByVal markers As GeoKeyedCollection(Of Marker))Dim icon As WebImage = New WebImage("C:\ThinkGeo_VB\theme\default\samplepic\circle.png")Dim layer As ShapeFileLayer = New ShapeFileLayer("C:\ZaragozaAtlas\espes2________pi.shp")Dim featureSource As FeatureSource = layer.FeatureSourceDim features As Collection(Of Feature) = featureSource.GetAllFeatures(New String() {"NAME", "STNAME"})For Each feature As Feature In featuresDim position As PointShape = CType(feature.GetShape(), PointShape)Dim marker As Marker = New Marker(position, icon)Dim cityInfomation As String = String.Format("{0} esta en la {1} thousand people.", feature.ColumnValues("NAME"), feature.ColumnValues("STNAME"))String.Format("{0}", cityInfomation)Next featureEnd Sub
I wait your support with this problem