Hello
I have this code running in the previos version of MapSuite Web 3 beta
How can I change to the new release Beta 2 ?
I need to create Markers from a database source
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Map1.MapUnit = GeographyUnit.DecimalDegree;
ShapeFileLayer difPoint = new ShapeFileLayer(@"C:\datos\confoto_point.shp", ShapeFileReadWriteMode.ReadOnly);
difPoint.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1;
difPoint.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.CurrentExtent = new RectangleShape(0, 78, 30, 26);
Map1.BackgroundMap.GoogleMap.Name = "Google Map";
Map1.BackgroundMap.GoogleMap.GoogleMapType = GoogleMapType.Normal;
Map1.BackgroundMap.GoogleMap.LibraryPath = "maps.google.com/maps?file=ap...zf5jKsbvTQ";
difPoint.Open();
DataTable dt = difPoint.ExecuteSqlQuery("select * from confoto_point");
MarkerLayer markerLayer = new MarkerLayer("Folios");
foreach (DataRow dr in dt.Rows)
{
Marker marker = new Marker((Double)dr["X"], (Double)dr["Y"], new WebImage("~/img/LOGONOVO44x44.JPEG"));
marker.Id = (string)dr["FOLIO"];
StringBuilder contentHtml = new StringBuilder();
contentHtml.Append("
.Append("src=\"foto/" + (string)dr["Folio"] + ".jpeg\" WIDTH=100 HEIGH=136>
")
.Append("FOLIO :" + (string)dr["Folio"] + "
")
.Append("NOMBRE :" + (string)dr["Nombre"] + "
")
.Append("PATERNO :" + (string)dr["Paterno"] + "
")
.Append("MATERNO :" + (string)dr["Materno"] + "
")
.Append(" ");
marker.Popup.ContentHtml = contentHtml.ToString();
marker.Popup.Width = 300;
marker.Popup.Height = 150;
ThinkGeo.MapSuite.Core.Feature fea = new Feature(marker);
markerLayer.FeatureSource.AddFeature(fea);
}
Map1.MarkerLayers.Add(markerLayer);
}
}
Thank you