-
Notifications
You must be signed in to change notification settings - Fork 110
/
TKCustomMap.cs
651 lines (638 loc) · 26 KB
/
TKCustomMap.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows.Input;
using TK.CustomMap.Interfaces;
using TK.CustomMap.Models;
using TK.CustomMap.Overlays;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace TK.CustomMap
{
/// <summary>
/// An extensions of the <see cref="Xamarin.Forms.Maps.Map"/>
/// </summary>
public class TKCustomMap : Map, IMapFunctions
{
/// <summary>
/// Event raised when a pin gets selected
/// </summary>
public event EventHandler<TKGenericEventArgs<TKCustomMapPin>> PinSelected;
/// <summary>
/// Event raised when a drag of a pin ended
/// </summary>
public event EventHandler<TKGenericEventArgs<TKCustomMapPin>> PinDragEnd;
/// <summary>
/// Event raised when an area of the map gets clicked
/// </summary>
public event EventHandler<TKGenericEventArgs<Position>> MapClicked;
/// <summary>
/// Event raised when an area of the map gets long-pressed
/// </summary>
public event EventHandler<TKGenericEventArgs<Position>> MapLongPress;
/// <summary>
/// Event raised when the location of the user changes
/// </summary>
public event EventHandler<TKGenericEventArgs<Position>> UserLocationChanged;
/// <summary>
/// Event raised when a route gets tapped
/// </summary>
public event EventHandler<TKGenericEventArgs<TKRoute>> RouteClicked;
/// <summary>
/// Event raised when a route calculation finished successfully
/// </summary>
public event EventHandler<TKGenericEventArgs<TKRoute>> RouteCalculationFinished;
/// <summary>
/// Event raised when a route calculation failed
/// </summary>
public event EventHandler<TKGenericEventArgs<TKRouteCalculationError>> RouteCalculationFailed;
/// <summary>
/// Event raised when all pins are added to the map initially
/// </summary>
public event EventHandler PinsReady;
/// <summary>
/// Event raised when a callout got tapped
/// </summary>
public event EventHandler<TKGenericEventArgs<TKCustomMapPin>> CalloutClicked;
/// <summary>
/// Property Key for the read-only bindable Property <see cref="MapFunctions"/>
/// </summary>
private static readonly BindablePropertyKey MapFunctionsPropertyKey = BindableProperty.CreateReadOnly(
nameof(MapFunctions),
typeof(IRendererFunctions),
typeof(TKCustomMap),
null,
defaultBindingMode: BindingMode.OneWayToSource);
/// <summary>
/// Bindable Property of <see cref="MapFunctions"/>
/// </summary>
public static readonly BindableProperty MapFunctionsProperty = MapFunctionsPropertyKey.BindableProperty;
/// <summary>
/// Bindable Property of <see cref="CustomPins" />
/// </summary>
public static readonly BindableProperty CustomPinsProperty = BindableProperty.Create(
nameof(CustomPins),
typeof(IEnumerable<TKCustomMapPin>),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="SelectedPin" />
/// </summary>
public static readonly BindableProperty SelectedPinProperty = BindableProperty.Create(
nameof(SelectedPin),
typeof(TKCustomMapPin),
typeof(TKCustomMap),
defaultBindingMode: BindingMode.TwoWay);
/// <summary>
/// Bindable Property of <see cref="PinSelectedCommand" />
/// </summary>
public static readonly BindableProperty PinSelectedCommandProperty = BindableProperty.Create(
nameof(PinSelectedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="MapClickedCommand"/>
/// </summary>
public static readonly BindableProperty MapClickedCommandProperty = BindableProperty.Create(
nameof(MapClickedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="MapLongPressCommand"/>
/// </summary>
public static readonly BindableProperty MapLongPressCommandProperty = BindableProperty.Create(
nameof(MapLongPressCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="PinDragEndCommand"/>
/// </summary>
public static readonly BindableProperty PinDragEndCommandProperty = BindableProperty.Create(
nameof(PinDragEndCommand),
typeof(Command<TKCustomMapPin>),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="PinsReadyCommand"/>
/// </summary>
public static readonly BindableProperty PinsReadyCommandProperty = BindableProperty.Create(
nameof(PinsReadyCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="MapCenter"/>
/// </summary>
public static readonly BindableProperty MapCenterProperty = BindableProperty.Create(
nameof(MapCenter),
typeof(Position),
typeof(TKCustomMap),
default(Position),
defaultBindingMode: BindingMode.TwoWay);
/// <summary>
/// Bindable Property of <see cref="IsRegionChangeAnimated"/>
/// </summary>
public static readonly BindableProperty IsRegionChangeAnimatedProperty = BindableProperty.Create(
nameof(IsRegionChangeAnimated),
typeof(bool),
typeof(TKCustomMap),
default(bool));
/// <summary>
/// Bindable Property of <see cref="ShowTraffic"/>
/// </summary>
public static readonly BindableProperty ShowTrafficProperty = BindableProperty.Create(
nameof(ShowTraffic),
typeof(bool),
typeof(TKCustomMap),
default(bool));
/// <summary>
/// Bindable Property of <see cref="Routes"/>
/// </summary>
public static readonly BindableProperty PolylinesProperty = BindableProperty.Create(
nameof(Polylines),
typeof(IEnumerable<TKPolyline>),
typeof(TKCustomMap),
null);
/// <summary>
/// Bindable Property of <see cref="Circles"/>
/// </summary>
public static readonly BindableProperty CirclesProperty = BindableProperty.Create(
nameof(Circles),
typeof(IEnumerable<TKCircle>),
typeof(TKCustomMap),
null);
/// <summary>
/// Bindable Property of <see cref="CalloutClickedCommand"/>
/// </summary>
public static readonly BindableProperty CalloutClickedCommandProperty = BindableProperty.Create(
nameof(CalloutClickedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="Polygons"/>
/// </summary>
public static readonly BindableProperty PolygonsProperty = BindableProperty.Create(
nameof(Polygons),
typeof(IEnumerable<TKPolygon>),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="MapRegion"/>
/// </summary>
public static readonly BindableProperty MapRegionProperty = BindableProperty.Create(
nameof(MapRegion),
typeof(MapSpan),
typeof(TKCustomMap),
defaultBindingMode: BindingMode.TwoWay);
/// <summary>
/// Bindable Property of <see cref="Routes"/>
/// </summary>
public static readonly BindableProperty RoutesProperty = BindableProperty.Create(
nameof(Routes),
typeof(IEnumerable<TKRoute>),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="RouteClickedCommand"/>
/// </summary>
public static readonly BindableProperty RouteClickedCommandProperty = BindableProperty.Create(
nameof(RouteClickedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="RouteCalculationFinishedCommand"/>
/// </summary>
public static readonly BindableProperty RouteCalculationFinishedCommandProperty = BindableProperty.Create(
nameof(RouteCalculationFinishedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="RouteCalculationFailedCommand"/>
/// </summary>
public static readonly BindableProperty RouteCalculationFailedCommandProperty = BindableProperty.Create(
nameof(RouteCalculationFailedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="TilesUrlOptions"/>
/// </summary>
public static readonly BindableProperty TilesUrlOptionsProperty = BindableProperty.Create(
nameof(TilesUrlOptions),
typeof(TKTileUrlOptions),
typeof(TKCustomMap));
/// <summary>
/// Bindable Property of <see cref="UserLocationChangedCommand"/>
/// </summary>
public static readonly BindableProperty UserLocationChangedCommandProperty = BindableProperty.Create(
nameof(UserLocationChangedCommand),
typeof(ICommand),
typeof(TKCustomMap));
/// <summary>
/// Gets/Sets the custom pins of the Map
/// </summary>
public IEnumerable<TKCustomMapPin> CustomPins
{
get { return (IEnumerable<TKCustomMapPin>)this.GetValue(CustomPinsProperty); }
set { this.SetValue(CustomPinsProperty, value); }
}
/// <summary>
/// Gets/Sets the currently selected pin on the map
/// </summary>
public TKCustomMapPin SelectedPin
{
get { return (TKCustomMapPin)this.GetValue(SelectedPinProperty); }
set { this.SetValue(SelectedPinProperty, value); }
}
/// <summary>
/// Gets/Sets the command when the map was clicked/tapped
/// </summary>
public ICommand MapClickedCommand
{
get { return (ICommand)this.GetValue(MapClickedCommandProperty); }
set { this.SetValue(MapClickedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a long press was performed on the map
/// </summary>
public ICommand MapLongPressCommand
{
get { return (ICommand)this.GetValue(MapLongPressCommandProperty); }
set { this.SetValue(MapLongPressCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a pin drag ended. The pin already has the updated position set
/// </summary>
public ICommand PinDragEndCommand
{
get { return (ICommand)this.GetValue(PinDragEndCommandProperty); }
set { this.SetValue(PinDragEndCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a pin got selected
/// </summary>
public ICommand PinSelectedCommand
{
get { return (ICommand)this.GetValue(PinSelectedCommandProperty); }
set { this.SetValue(PinSelectedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when the pins are ready
/// </summary>
public ICommand PinsReadyCommand
{
get { return (ICommand)this.GetValue(PinsReadyCommandProperty); }
set { this.SetValue(PinsReadyCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the current center of the map.
/// </summary>
public Position MapCenter
{
get { return (Position)this.GetValue(MapCenterProperty); }
set { this.SetValue(MapCenterProperty, value); }
}
/// <summary>
/// Gets/Sets if a change of <see cref="MapCenter"/> or <see cref="MapRegion"/> should be animated
/// </summary>
public bool IsRegionChangeAnimated
{
get { return (bool)this.GetValue(IsRegionChangeAnimatedProperty); }
set { this.SetValue(IsRegionChangeAnimatedProperty, value); }
}
/// <summary>
/// Gets/Sets the lines to display on the map
/// </summary>
public IEnumerable<TKPolyline> Polylines
{
get { return (IEnumerable<TKPolyline>)this.GetValue(PolylinesProperty); }
set { this.SetValue(PolylinesProperty, value); }
}
/// <summary>
/// Gets/Sets the circles to display on the map
/// </summary>
public IEnumerable<TKCircle> Circles
{
get { return (IEnumerable<TKCircle>)this.GetValue(CirclesProperty); }
set { this.SetValue(CirclesProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a callout gets clicked. When this is set, there will be an accessory button visible inside the callout on iOS.
/// Android will simply raise the command by clicking anywhere inside the callout, since Android simply renders a bitmap
/// </summary>
public ICommand CalloutClickedCommand
{
get { return (ICommand)this.GetValue(CalloutClickedCommandProperty); }
set { this.SetValue(CalloutClickedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the rectangles to display on the map
/// </summary>
public IEnumerable<TKPolygon> Polygons
{
get { return (IEnumerable<TKPolygon>)this.GetValue(PolygonsProperty); }
set { this.SetValue(PolygonsProperty, value); }
}
/// <summary>
/// Gets/Sets the visible map region
/// </summary>
public MapSpan MapRegion
{
get { return (MapSpan)this.GetValue(MapRegionProperty); }
set { this.SetValue(MapRegionProperty, value); }
}
/// <summary>
/// Gets/Sets the routes to calculate and display on the map
/// </summary>
public IEnumerable<TKRoute> Routes
{
get { return (IEnumerable<TKRoute>)this.GetValue(RoutesProperty); }
set { this.SetValue(RoutesProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a route gets tapped
/// </summary>
public ICommand RouteClickedCommand
{
get { return (Command<TKRoute>)this.GetValue(RouteClickedCommandProperty); }
set { this.SetValue(RouteClickedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a route calculation finished successfully
/// </summary>
public ICommand RouteCalculationFinishedCommand
{
get { return (ICommand)this.GetValue(RouteCalculationFinishedCommandProperty); }
set { this.SetValue(RouteCalculationFinishedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the command when a route calculation failed
/// </summary>
public ICommand RouteCalculationFailedCommand
{
get { return (ICommand)this.GetValue(RouteCalculationFailedCommandProperty); }
set { this.SetValue(RouteCalculationFailedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the options for displaying custom tiles via an url
/// </summary>
public TKTileUrlOptions TilesUrlOptions
{
get { return (TKTileUrlOptions)this.GetValue(TilesUrlOptionsProperty); }
set { this.SetValue(TilesUrlOptionsProperty, value); }
}
/// <summary>
/// Gets/Sets the command when the user location changed
/// </summary>
public ICommand UserLocationChangedCommand
{
get { return (ICommand)this.GetValue(UserLocationChangedCommandProperty); }
set { this.SetValue(UserLocationChangedCommandProperty, value); }
}
/// <summary>
/// Gets/Sets the avaiable functions on the map/renderer
/// </summary>
public IRendererFunctions MapFunctions
{
get { return (IRendererFunctions)this.GetValue(MapFunctionsProperty); }
private set { this.SetValue(MapFunctionsPropertyKey, value); }
}
/// <summary>
/// Gets/Sets if traffic information should be displayed
/// </summary>
public bool ShowTraffic
{
get { return (bool)this.GetValue(ShowTrafficProperty); }
set { this.SetValue(ShowTrafficProperty, value); }
}
/// <summary>
/// Creates a new instance of <c>TKCustomMap</c>
/// </summary>
public TKCustomMap()
: base()
{ }
/// <summary>
/// Creates a new instance of <c>TKCustomMap</c>
/// </summary>
/// <param name="region">The initial region of the map</param>
public TKCustomMap(MapSpan region)
: base(region)
{
this.MapCenter = region.Center;
}
/// <summary>
/// Creates a new instance of <see cref="TKCustomMap"/>
/// </summary>
/// <param name="initialLatitude">The initial latitude value</param>
/// <param name="initialLongitude">The initial longitude value</param>
/// <param name="distanceInKilometers">The initial zoom distance in kilometers</param>
public TKCustomMap(double initialLatitude, double initialLongitude, double distanceInKilometers) :
base(MapSpan.FromCenterAndRadius(new Position(initialLatitude, initialLongitude), Distance.FromKilometers(distanceInKilometers)))
{
}
/// <inheritdoc/>
protected override void OnPropertyChanged(string propertyName = null)
{
base.OnPropertyChanged(propertyName);
if (propertyName == "VisibleRegion")
{
this.MapRegion = this.VisibleRegion;
}
}
/// <summary>
/// Returns the currently visible map as a PNG image
/// </summary>
/// <returns>Map as image</returns>
public async Task<byte[]> GetSnapshot()
{
return await this.MapFunctions.GetSnapshot();
}
/// <summary>
/// Moves the visible region to the specified <see cref="MapSpan"/>
/// </summary>
/// <param name="region">Region to move the map to</param>
/// <param name="animate">If the region change should be animated or not</param>
public void MoveToMapRegion(MapSpan region, bool animate = false)
{
this.MapFunctions.MoveToMapRegion(region, animate);
}
/// <summary>
/// Fits the map region to make all given positions visible
/// </summary>
/// <param name="positions">Positions to fit inside the MapRegion</param>
/// <param name="animate">If the camera change should be animated</param>
public void FitMapRegionToPositions(IEnumerable<Position> positions, bool animate = false)
{
this.MapFunctions.FitMapRegionToPositions(positions, animate);
}
/// <summary>
/// Fit all regions on the map
/// </summary>
/// <param name="regions">The regions to fit to the map</param>
/// <param name="animate">Animation on/off</param>
public void FitToMapRegions(IEnumerable<MapSpan> regions, bool animate = false)
{
this.MapFunctions.FitToMapRegions(regions, animate);
}
/// <summary>
/// Converts an array of <see cref="Point"/> into geocoordinates
/// </summary>
/// <param name="screenLocations">The screen locations(pixel)</param>
/// <returns>A collection of <see cref="Position"/></returns>
public IEnumerable<Position> ScreenLocationsToGeocoordinates(params Point[] screenLocations)
{
return this.MapFunctions.ScreenLocationsToGeocoordinates(screenLocations);
}
/// <summary>
/// Raises <see cref="PinSelected"/>
/// </summary>
/// <param name="pin">The selected pin</param>
protected void OnPinSelected(TKCustomMapPin pin)
{
this.PinSelected?.Invoke(this, new TKGenericEventArgs<TKCustomMapPin>(pin));
this.RaiseCommand(this.PinSelectedCommand, pin);
}
/// <summary>
/// Raises <see cref="PinDragEnd"/>
/// </summary>
/// <param name="pin">The dragged pin</param>
protected void OnPinDragEnd(TKCustomMapPin pin)
{
this.PinDragEnd?.Invoke(this, new TKGenericEventArgs<TKCustomMapPin>(pin));
this.RaiseCommand(this.PinDragEndCommand, pin);
}
/// <summary>
/// Raises <see cref="MapClicked"/>
/// </summary>
/// <param name="position">The position on the map</param>
protected void OnMapClicked(Position position)
{
this.MapClicked?.Invoke(this, new TKGenericEventArgs<Position>(position));
this.RaiseCommand(this.MapClickedCommand, position);
}
/// <summary>
/// Raises <see cref="MapLongPress"/>
/// </summary>
/// <param name="position">The position on the map</param>
protected void OnMapLongPress(Position position)
{
this.MapLongPress?.Invoke(this, new TKGenericEventArgs<Position>(position));
this.RaiseCommand(this.MapLongPressCommand, position);
}
/// <summary>
/// Raises <see cref="RouteClicked"/>
/// </summary>
/// <param name="route">The tapped route</param>
protected void OnRouteClicked(TKRoute route)
{
this.RouteClicked?.Invoke(this, new TKGenericEventArgs<TKRoute>(route));
this.RaiseCommand(this.RouteClickedCommand, route);
}
/// <summary>
/// Raises <see cref="RouteCalculationFinished"/>
/// </summary>
/// <param name="route">The route</param>
protected void OnRouteCalculationFinished(TKRoute route)
{
this.RouteCalculationFinished?.Invoke(this, new TKGenericEventArgs<TKRoute>(route));
this.RaiseCommand(this.RouteCalculationFinishedCommand, route);
}
/// <summary>
/// Raises <see cref="RouteCalculationFailed"/>
/// </summary>
/// <param name="error">The error</param>
protected void OnRouteCalculationFailed(TKRouteCalculationError error)
{
this.RouteCalculationFailed?.Invoke(this, new TKGenericEventArgs<TKRouteCalculationError>(error));
this.RaiseCommand(this.RouteCalculationFailedCommand, error);
}
/// <summary>
/// Raises <see cref="UserLocationChanged"/>
/// </summary>
/// <param name="position">The position of the user</param>
protected void OnUserLocationChanged(Position position)
{
this.UserLocationChanged?.Invoke(this, new TKGenericEventArgs<Position>(position));
this.RaiseCommand(this.UserLocationChangedCommand, position);
}
/// <summary>
/// Raises <see cref="PinsReady"/>
/// </summary>
protected void OnPinsReady()
{
this.PinsReady?.Invoke(this, new EventArgs());
this.RaiseCommand(this.PinsReadyCommand, null);
}
/// <summary>
/// Raises <see cref="CalloutClicked"/>
/// </summary>
protected void OnCalloutClicked(TKCustomMapPin pin)
{
this.CalloutClicked?.Invoke(this, new TKGenericEventArgs<TKCustomMapPin>(pin));
this.RaiseCommand(this.CalloutClickedCommand, pin);
}
/// <summary>
/// Raises a specific command
/// </summary>
/// <param name="command">The command to raise</param>
/// <param name="parameter">Addition command parameter</param>
private void RaiseCommand(ICommand command, object parameter)
{
if(command != null && command.CanExecute(parameter))
{
command.Execute(parameter);
}
}
/// <summary>
/// <inheritdoc/>
/// </summary>
void IMapFunctions.SetRenderer(IRendererFunctions renderer)
{
this.MapFunctions = renderer;
}
/// <inheritdoc/>
void IMapFunctions.RaisePinSelected(TKCustomMapPin pin)
{
this.OnPinSelected(pin);
}
/// <inheritdoc/>
void IMapFunctions.RaisePinDragEnd(TKCustomMapPin pin)
{
this.OnPinDragEnd(pin);
}
/// <inheritdoc/>
void IMapFunctions.RaiseMapClicked(Position position)
{
this.OnMapClicked(position);
}
/// <inheritdoc/>
void IMapFunctions.RaiseMapLongPress(Position position)
{
this.OnMapLongPress(position);
}
/// <inheritdoc/>
void IMapFunctions.RaiseUserLocationChanged(Position position)
{
this.OnUserLocationChanged(position);
}
/// <inheritdoc/>
void IMapFunctions.RaiseRouteClicked(TKRoute route)
{
this.OnRouteClicked(route);
}
/// <inheritdoc/>
void IMapFunctions.RaiseRouteCalculationFinished(TKRoute route)
{
this.OnRouteCalculationFinished(route);
}
/// <inheritdoc/>
void IMapFunctions.RaiseRouteCalculationFailed(TKRouteCalculationError route)
{
this.OnRouteCalculationFailed(route);
}
/// <inheritdoc/>
void IMapFunctions.RaisePinsReady()
{
this.OnPinsReady();
}
/// <inheritdoc/>
void IMapFunctions.RaiseCalloutClicked(TKCustomMapPin pin)
{
this.OnCalloutClicked(pin);
}
}
}