ThinkGeo.com    |     Documentation    |     Premium Support

Problems on having loaded the map shp


This one is my code and the problem is that it loads the web but I do not visualize the map


you can help me


 


Protected



 Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadIf (Not Page.IsPostBack) Then

Map1.BackgroundFillBrush =


Map1.CurrentExtent =


Map1.MapUnit = GeographyUnit.DecimalDegree


New GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"))New RectangleShape(-114.34, 75.27, 108.79, -70.23)

Dim


mapanavarra =


 mapanavarra As ShapeFileLayerNew ShapeFileLayer("c:\navarra\Navarra.shp")

mapanavarra.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.GetSimpleAreaStyle(GeoColor.FromArgb(255, 243, 239, 228), GeoColor.FromArgb(255, 218, 193, 163), 1)


mapanavarra.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20


Map1.StaticLayers.Add(


"MapaNavarra", mapanavarra) 

Map1.ScaleLine.Enabled =


True

Map1.PanZoomBar.Enabled =


True

Map1.MousePosition.Enabled =


True

Map1.LayerSwitcher.Enabled =


True

Map1.Overview.Enabled =


True

End


 If

 


 


 


 


End Sub


 


 



Alan,


 After rearranging your code, it works well on my machine. Could you please do the following checks to see if you can figure it out?
 
Step 1, run the attached code to see if it works (please change the data path in the code if you didn’t install it in the default folder)
Step2, if Step1 doesn’t work, please let me know about your machine environment, such as the operating system, the version of VS and Web Edition.
Step 3, if Step 1 works, please change to your own data. If you are still having the problem, please send the data to us and we will have a further investigation here. Just send it to support@thinkgeo.com and ask to forward to Ben. 
 
Ben

46-VBCodeForAlan.txt (1.21 KB)

Thank you Ben, I find the solution and it was the projection. Anyhow thank you.


The code that is absent is



mapazaragoza2.FeatureSource.Projection = New Proj4Projection(23030,23030)



alan



sorry and also this line


mapazaragoza1.FeatureSource.Projection = proj4Projection



Thanks for letting me know, Alan. And we are always glad to help you for any more queries.