//void MapOnCircleClick(object sender, GoogleMap.CircleClickEventArgs eventArgs) //{ // // clicked polygon // var clickedCircle = eventArgs.Circle; // // lookup pin // Circle targetCircle = null; // for (var i = 0; i < Map.Circles.Count; i++) // { // var circle = Map.Circles[i]; // if ((string)circle.Id != clickedCircle.Id) // continue; // targetCircle = circle; // break; // } // // only consider event handled if a handler is present. // // Else allow default behavior of displaying an info window. // targetCircle?.SendTap(); //} void AddPolylines(IList polylines) { var map = NativeMap; if (map == null) return; if (_polylines == null) _polylines = new List<APolyline>(); _polylines.AddRange(polylines.Cast<Polyline>().Select(line => { var polyline = (Polyline)line; var opts = new PolylineOptions(); foreach (var p in polyline.Positions) opts.Add(new LatLng(p.Latitude, p.Longitude)); opts.InvokeWidth(polyline.StrokeWidth * _scaledDensity); // TODO: convert from px to pt. Is this collect? (looks like same iOS Maps) opts.InvokeColor(polyline.StrokeColor.ToAndroid()); opts.Clickable(polyline.IsClickable); var nativePolyline = map.AddPolyline(opts); // associate pin with marker for later lookup in event handlers polyline.Id = nativePolyline; return nativePolyline; })); }