public override void DrawCore(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { #if DEBUG Log.Debug("com.mapquest.android.maps.lineoverlay", "LineOverlay.draw()"); #endif ////if (this.listener == null) ////{ //// this.listener = new EventListener(null); //// mapView.addMapViewEventListener(this.listener); ////} Rect bounds = canvas.ClipBounds; Rect imageRegion = Util.CreateRectFromBoundingBox(boundingBox, drawContext.MapView); int pad = (int) LinePaint.StrokeWidth/2; imageRegion.Inset(-pad, -pad); BoundingBox screenBox = Util.CreateBoundingBoxFromRect(bounds, drawContext.MapView); foreach (var feature in features) { if (CanDraw(feature)) { DrawLineCore(feature.Geometry, GetPaint(feature), imageRegion, bounds, screenBox, drawContext.MapView, canvas); } } }
public override void Draw(Canvas canvas, MapView mapView, bool shadow) { var beginDrawEventArgs = new OverlayDrawEventArgs(); OnBeginDraw(beginDrawEventArgs); if (beginDrawEventArgs.Cancel) return; var drawContext = new DrawContext(mapView.Context.Assets, mapView); ZoomLevelSet.Draw(FeatureSource, FeatureSource.GetBoundingBox(), canvas, drawContext, shadow); }
public override void DrawCore(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { var projection = drawContext.MapView.Projection; var bounds = canvas.ClipBounds; BoundingBox screenBox = Util.CreateBoundingBoxFromRect(bounds, drawContext.MapView); if (BoundingBox.Intersect(boundingBox, screenBox)) { Point point = new Point(); foreach (var feature in features) { // there is a condition that checks for focus index before drawing if (!CanDraw(feature)) continue; Drawable marker = GetMarker(feature, drawContext.Assets); //if (item.Alignment != 0) //{ // Overlay.SetAlignment(marker, item.Alignment); //} var geoPoint = feature.Geometry as GeoPoint; if (geoPoint == null) continue; projection.ToPixels(geoPoint, point); DrawFeature(canvas, feature, point, marker, shadow); } //int size = this.items.size(); //for (int i = size - 1; i >= 0; i--) //{ // if (this.focusedIndex != i) // { // OverlayItem item = getItem(i); // item. // Drawable marker = GetMarker(item); // if (item.Alignment != 0) // { // Overlay.SetAlignment(marker, item.Alignment); // } // projection.ToPixels(item.Point, point); // DrawFeature(canvas, item, point, marker, shadow); // } //} //if ((this.drawFocusedItem) && (this.focusedIndex != -1)) //{ // Item item = getItem(this.focusedIndex); // projection.ToPixels(item.getPoint(), point); // drawItem(canvas, getItem(this.focusedIndex), point, getMarker(item), shadow); //} } }
public void Draw(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { var enumerable = features as IList<Feature> ?? features.ToList(); if (CustomZoomLevels.Count > 0) { foreach (var zoomLevel in CustomZoomLevels) { zoomLevel.Draw(enumerable, boundingBox, canvas, drawContext, shadow); } } else { ZoomLevel01.Draw(enumerable, boundingBox, canvas, drawContext, shadow); } }
public void Draw(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { var enumerable = features as IList<Feature> ?? features.ToList(); if (CustomStyles.Count > 0) { foreach (var style in CustomStyles) { style.Draw(enumerable, boundingBox, canvas, drawContext, shadow); } } else { DefaultPointStyle.Draw(enumerable, boundingBox, canvas, drawContext, shadow); DefaultLineStyle.Draw(enumerable, boundingBox, canvas, drawContext, shadow); DefaultAreaStyle.Draw(enumerable, boundingBox, canvas, drawContext, shadow); DefaultTextStyle.Draw(enumerable, boundingBox, canvas, drawContext, shadow); } }
public abstract void DrawCore(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow);
public void Draw(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { DrawCore(features, boundingBox, canvas, drawContext, shadow); }
public override void DrawCore(IEnumerable<Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { throw new NotImplementedException(); }
public abstract void DrawCore(IEnumerable <Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow);
public void Draw(IEnumerable <Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { DrawCore(features, boundingBox, canvas, drawContext, shadow); }
public override void DrawCore(IEnumerable <Feature> features, BoundingBox boundingBox, Canvas canvas, DrawContext drawContext, bool shadow) { throw new NotImplementedException(); }