Dear Johnny,
Please find the error as below.
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: localhost/map/opl_GeoResource.axd:43
The way I created the lines :
CreateLine Layer as below :
private void CreateLineLayer()
{
InMemoryFeatureLayer LineLayer
= new InMemoryFeatureLayer();
LineLayer.Name = _LineLayerName;
LineLayer.ZoomLevelSet.ZoomLevel01.
DefaultPointStyle = PointStyles.City7;
LineLayer.ZoomLevelSet.ZoomLevel01.
DefaultLineStyle = LineStyles.CreateSimpleLineStyle(
GeoColor.SimpleColors.Green,
PrimaryLineWidth, true);
LineLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel
= ApplyUntilZoomLevel.Level20;
LayerOverlay OverLayLine = new LayerOverlay();
OverLayLine .Name = _MapLineOverlayName;
OverLayLine .Layers.Add(_LineLayerName,
activeMapLineLayer);
mapControl.CustomOverlays.Add(OverLayLine );
}
private void CreateLines(){
mapLineLayer =
(InMemoryFeatureLayer)((LayerOverlay)
(mapControl.CustomOverlays[2])).
Layers[_LineLayerName];
foreach (DataRow linerow in LineMarkers)
{
// Lines
Collection<Vertex> points =
new Collection<Vertex>();
double pointX =
Convert.ToDouble(linerow["StartLongitude"]);
double pointY =
Convert.ToDouble(linerow["StartLatitude"]);
points.Add(new Vertex(pointX, pointY));
pointX = Convert.ToDouble(linerow["EndLongitude"]);
pointY = Convert.ToDouble(linerow["EndLongitude"]);
points.Add(new Vertex(pointX, pointY));
LineShape line = new LineShape(points);
string lineId = string.Format(
"{0}{1}",
_LineLayer,
linerow["markerId"]);
// Adding the line with layer
mapLineLayer .InternalFeatures.Add(
lineId,
new ThinkGeo.MapSuite.Core.Feature(line));
mapLayer.DrawingQuality =
DrawingQuality.Default;
}
}
Thanks
Raja