Hi All,
I installed the web edition trial and am currently playing around with it to see if it will suit my application needs. One thing I am having difficulty with is getting shape files to load in a reasonable amount of time. For example, I downloaded your modified OpenStreeMap files and tried to populate a map with the default world map layer, a states layer for the US, and a roads layer from the south-dakota roads.shp file. Here is what my code looks like.....
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim worldlayer As New ShapeFileFeatureLayer
Dim statelayer As New ShapeFileFeatureLayer
Dim roadslayer As New ShapeFileFeatureLayer
Dim WorldFile, StatesFile, RoadFile
WorldFile = "C:\Program Files (x86)\ThinkGeo\Map Suite Web Evaluation Edition 5.5\Samples\VB Samples\SampleData\World\cntry02.shp"
StatesFile = "C:\Program Files (x86)\ThinkGeo\Map Suite Web Evaluation Edition 5.5\Samples\VB Samples\SampleData\USA\STATES.SHP"
RoadFile = "C:\Users\Corye\Desktop\TestMapping\TestMapping\TestMapping\MapResource\south-dakota\roads.shp"
If Not IsPostBack Then
Map1.MapUnit = GeographyUnit.DecimalDegree
Map1.MapTools.ScaleLine.Enabled = True
Map1.MapBackground.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)
Map1.CurrentExtent = New RectangleShape(5, 78, 30, 26)
worldlayer = New ShapeFileFeatureLayer(WorldFile)
worldlayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1
worldlayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
statelayer = New ShapeFileFeatureLayer(StatesFile)
statelayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.State1
statelayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
roadlayer = New ShapeFileFeatureLayer(RoadFile)
roadlayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.localroads1
roadlayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
roadlayer.RequireIndex = False
Map1.StaticOverlay.Layers.Add(worldlayer)
Map1.StaticOverlay.Layers.Add(statelayer)
Map1.StaticOverlay.Layers.Add(roadlayer)
End If
End Sub
This code DOES open the expected map with the desired layers, but it takes 30-60 seconds to render it. To make matters worse, it takes nearly that long on each zoom level so using the map is almost impossible. Any advice on making this run quicker or is this the norm?
Thanks,