/// <summary> /// /// </summary> /// <param name="Component"></param> public override void Initialize(IComponent component) { _map = component as GoogleMap; if (_map == null) throw new ArgumentException("Component must be a GoogleMap control", "component"); base.Initialize(component); //SetViewFlags(ViewFlags.TemplateEditing, true); }
/// <summary> /// Initializes a new instance of the <see cref="GoogleMarkerEvents"/> class. /// </summary> /// <param name="map">The map.</param> public GooglePolygonEvents(GoogleMap map) { _map = map; }
/// <summary> /// Initializes a new instance of the <see cref="GoogleMarkerEvents"/> class. /// </summary> /// <param name="map">The map.</param> public GoogleMarkerEvents(GoogleMap map) { _map = map; }
/// <summary> /// Initializes a new instance of the <see cref="GoogleMarkerEvents"/> class. /// </summary> /// <param name="map">The map.</param> public GooglePolylineEvents(GoogleMap map) { _map = map; }
public void CalculateConsolidationSolution() { CLSCOBO_ConsolidationEngine ao_ConsolidationEngine; CLSCOBO_OriginPoint vo_OriginPoint=null; GooglePolyline vo_PolyLine=null; GoogleLocation vo_GoogleLocation; Color vo_Color=Color.Black; int pi_Quadrant=0; int x = 0; if(ao_GoogleMap==null) ao_GoogleMap=(GoogleMap)CLSCOBO_FunctionsRepository.getElement("GoogleMap1", ao_WebPage); if (ao_ConsolidationProblem != null){ ao_ConsolidationEngine = new CLSCOBO_ConsolidationEngine(ao_ConsolidationProblem); foreach(CLSCOBO_ConsolidationSolution vo_ConsolidationSolutionPointer in ao_ConsolidationEngine.ConsolidationSolutions) { //CLSCOBO_ConsolidationSolution vo_ConsolidationSolutionPointer=ao_ConsolidationEngine.ConsolidationSolutions[ao_ConsolidationEngine.ConsolidationSolutions.Count-1]; ao_GoogleMap.Polylines.Clear(); pi_Quadrant=0; foreach(CLSCOBO_TruckItinerary vo_TruckItineraryPointer in vo_ConsolidationSolutionPointer.TruckItineraries) { vo_PolyLine=new GooglePolyline(); vo_PolyLine.Color=(pi_Quadrant==1)?Color.Blue:(pi_Quadrant==2)?Color.Red:(pi_Quadrant==3)?Color.Green:Color.Gold; vo_OriginPoint=ao_ConsolidationEngine.ConsolidationSolutions[x].TruckItineraries[0].OriginPoint; vo_GoogleLocation=new GoogleLocation(vo_OriginPoint.Latitude, vo_OriginPoint.Longitude); vo_PolyLine.Points.Add(vo_GoogleLocation); foreach(CLSCOBO_DeliveryPoint vo_DeliveryPointPointer in vo_TruckItineraryPointer.Deliveries) { vo_GoogleLocation=new GoogleLocation(vo_DeliveryPointPointer.Latitude, vo_DeliveryPointPointer.Longitude); if((vo_GoogleLocation.Latitude!=0) && (vo_GoogleLocation.Longitude!=0)) { vo_PolyLine.Points.Add(vo_GoogleLocation); } } pi_Quadrant++; ao_GoogleMap.Polylines.Add(vo_PolyLine); System.Threading.Thread.Sleep(50); } } } }
private void LoadFileZips(string ps_FileName) { TextBox vo_TextBox=(TextBox)CLSCOBO_FunctionsRepository.getElement("TxtFileName", ao_WebPage); if(ao_GoogleMap==null) ao_GoogleMap=(GoogleMap)CLSCOBO_FunctionsRepository.getElement("GoogleMap1", ao_WebPage); ao_GoogleMap.Markers.Clear(); ao_GoogleMap.Polylines.Clear(); ao_ConsolidationProblem=null; ao_ConsolidationProblem=CLSCOBO_FunctionsRepository.ReadFile(ref ps_FileName); vo_TextBox.Text=ps_FileName; FillInGraphicData(); }
private void DrawPoints() { if(ao_GoogleMap==null) ao_GoogleMap=(GoogleMap)CLSCOBO_FunctionsRepository.getElement("GoogleMap1", ao_WebPage); GoogleMarker vo_GoogleMarker; vo_GoogleMarker=new GoogleMarker(ao_ConsolidationProblem.OriginPoint.Latitude, ao_ConsolidationProblem.OriginPoint.Longitude); vo_GoogleMarker.Text=CLSCOBO_FunctionsRepository.CreateTag(ao_ConsolidationProblem.OriginPoint); vo_GoogleMarker.Title=ao_ConsolidationProblem.OriginPoint.ZipCode; ao_GoogleMap.Markers.Add(vo_GoogleMarker); foreach (CLSCOBO_DeliveryPoint po_DeliveryPoint in ao_ConsolidationProblem.Deliveries){ vo_GoogleMarker = new GoogleMarker(po_DeliveryPoint.Latitude,po_DeliveryPoint.Longitude); vo_GoogleMarker.Text=CLSCOBO_FunctionsRepository.CreateTag(po_DeliveryPoint); vo_GoogleMarker.Title=po_DeliveryPoint.ZipCode; ao_GoogleMap.Markers.Add(vo_GoogleMarker); } }