@complexify/expo-mapbox-navigation 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,6 +260,158 @@ public class ExpoMapboxNavigationModule: Module {
|
|
260
260
|
view.controller.update()
|
261
261
|
}
|
262
262
|
}
|
263
|
+
|
264
|
+
// Next Banner View
|
265
|
+
Prop("nextBannerBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
266
|
+
if let hexColor = color {
|
267
|
+
view.controller.setNextBannerBackgroundColor(hexColor: hexColor)
|
268
|
+
}
|
269
|
+
}
|
270
|
+
|
271
|
+
Prop("nextBannerPrimaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
272
|
+
if let hexColor = color {
|
273
|
+
view.controller.setNextBannerPrimaryTextColor(hexColor: hexColor)
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
Prop("nextBannerSecondaryTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
278
|
+
if let hexColor = color {
|
279
|
+
view.controller.setNextBannerSecondaryTextColor(hexColor: hexColor)
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
Prop("nextBannerDistanceTextColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
284
|
+
if let hexColor = color {
|
285
|
+
view.controller.setNextBannerDistanceTextColor(hexColor: hexColor)
|
286
|
+
}
|
287
|
+
}
|
288
|
+
|
289
|
+
// Progress Bar
|
290
|
+
Prop("progressBarProgressColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
291
|
+
if let hexColor = color {
|
292
|
+
view.controller.setProgressBarProgressColor(hexColor: hexColor)
|
293
|
+
}
|
294
|
+
}
|
295
|
+
|
296
|
+
Prop("progressBarBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
297
|
+
if let hexColor = color {
|
298
|
+
view.controller.setProgressBarBackgroundColor(hexColor: hexColor)
|
299
|
+
}
|
300
|
+
}
|
301
|
+
|
302
|
+
// Maneuver View
|
303
|
+
Prop("maneuverViewPrimaryColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
304
|
+
if let hexColor = color {
|
305
|
+
view.controller.setManeuverViewPrimaryColor(hexColor: hexColor)
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
Prop("maneuverViewSecondaryColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
310
|
+
if let hexColor = color {
|
311
|
+
view.controller.setManeuverViewSecondaryColor(hexColor: hexColor)
|
312
|
+
}
|
313
|
+
}
|
314
|
+
|
315
|
+
Prop("maneuverViewPrimaryColorHighlighted") { (view: ExpoMapboxNavigationView, color: String?) in
|
316
|
+
if let hexColor = color {
|
317
|
+
view.controller.setManeuverViewPrimaryColorHighlighted(hexColor: hexColor)
|
318
|
+
}
|
319
|
+
}
|
320
|
+
|
321
|
+
Prop("maneuverViewSecondaryColorHighlighted") { (view: ExpoMapboxNavigationView, color: String?) in
|
322
|
+
if let hexColor = color {
|
323
|
+
view.controller.setManeuverViewSecondaryColorHighlighted(hexColor: hexColor)
|
324
|
+
}
|
325
|
+
}
|
326
|
+
|
327
|
+
// Instructions Card
|
328
|
+
Prop("instructionsCardBackgroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
329
|
+
if let hexColor = color {
|
330
|
+
view.controller.setInstructionsCardBackgroundColor(hexColor: hexColor)
|
331
|
+
}
|
332
|
+
}
|
333
|
+
|
334
|
+
Prop("instructionsCardSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
335
|
+
if let hexColor = color {
|
336
|
+
view.controller.setInstructionsCardSeparatorColor(hexColor: hexColor)
|
337
|
+
}
|
338
|
+
}
|
339
|
+
|
340
|
+
Prop("instructionsCardHighlightedSeparatorColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
341
|
+
if let hexColor = color {
|
342
|
+
view.controller.setInstructionsCardHighlightedSeparatorColor(hexColor: hexColor)
|
343
|
+
}
|
344
|
+
}
|
345
|
+
|
346
|
+
// Exit View
|
347
|
+
Prop("exitViewForegroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
348
|
+
if let hexColor = color {
|
349
|
+
view.controller.setExitViewForegroundColor(hexColor: hexColor)
|
350
|
+
}
|
351
|
+
}
|
352
|
+
|
353
|
+
Prop("exitViewBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
354
|
+
if let hexColor = color {
|
355
|
+
view.controller.setExitViewBorderColor(hexColor: hexColor)
|
356
|
+
}
|
357
|
+
}
|
358
|
+
|
359
|
+
Prop("exitViewHighlightColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
360
|
+
if let hexColor = color {
|
361
|
+
view.controller.setExitViewHighlightColor(hexColor: hexColor)
|
362
|
+
}
|
363
|
+
}
|
364
|
+
|
365
|
+
// Route Shield
|
366
|
+
Prop("routeShieldForegroundColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
367
|
+
if let hexColor = color {
|
368
|
+
view.controller.setRouteShieldForegroundColor(hexColor: hexColor)
|
369
|
+
}
|
370
|
+
}
|
371
|
+
|
372
|
+
Prop("routeShieldBorderColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
373
|
+
if let hexColor = color {
|
374
|
+
view.controller.setRouteShieldBorderColor(hexColor: hexColor)
|
375
|
+
}
|
376
|
+
}
|
377
|
+
|
378
|
+
Prop("routeShieldHighlightColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
379
|
+
if let hexColor = color {
|
380
|
+
view.controller.setRouteShieldHighlightColor(hexColor: hexColor)
|
381
|
+
}
|
382
|
+
}
|
383
|
+
|
384
|
+
// Distance Labels
|
385
|
+
Prop("distanceRemainingColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
386
|
+
if let hexColor = color {
|
387
|
+
view.controller.setDistanceRemainingColor(hexColor: hexColor)
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
Prop("distanceUnitColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
392
|
+
if let hexColor = color {
|
393
|
+
view.controller.setDistanceUnitColor(hexColor: hexColor)
|
394
|
+
}
|
395
|
+
}
|
396
|
+
|
397
|
+
Prop("distanceValueColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
398
|
+
if let hexColor = color {
|
399
|
+
view.controller.setDistanceValueColor(hexColor: hexColor)
|
400
|
+
}
|
401
|
+
}
|
402
|
+
|
403
|
+
// Rating Control
|
404
|
+
Prop("ratingControlNormalColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
405
|
+
if let hexColor = color {
|
406
|
+
view.controller.setRatingControlNormalColor(hexColor: hexColor)
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
Prop("ratingControlSelectedColor") { (view: ExpoMapboxNavigationView, color: String?) in
|
411
|
+
if let hexColor = color {
|
412
|
+
view.controller.setRatingControlSelectedColor(hexColor: hexColor)
|
413
|
+
}
|
414
|
+
}
|
263
415
|
}
|
264
416
|
}
|
265
417
|
}
|
@@ -344,6 +344,151 @@ class ExpoMapboxNavigationViewController: UIViewController {
|
|
344
344
|
update()
|
345
345
|
}
|
346
346
|
|
347
|
+
func setStepsBackgroundColor(hexColor: String) {
|
348
|
+
customDayStyle.customStepsBackgroundColor = UIColor(hex: hexColor)
|
349
|
+
update()
|
350
|
+
}
|
351
|
+
|
352
|
+
func setStepsPrimaryTextColor(hexColor: String) {
|
353
|
+
customDayStyle.customStepsPrimaryTextColor = UIColor(hex: hexColor)
|
354
|
+
update()
|
355
|
+
}
|
356
|
+
|
357
|
+
func setStepsSecondaryTextColor(hexColor: String) {
|
358
|
+
customDayStyle.customStepsSecondaryTextColor = UIColor(hex: hexColor)
|
359
|
+
update()
|
360
|
+
}
|
361
|
+
|
362
|
+
func setStepsManeuverViewPrimaryColor(hexColor: String) {
|
363
|
+
customDayStyle.customStepsManeuverViewPrimaryColor = UIColor(hex: hexColor)
|
364
|
+
update()
|
365
|
+
}
|
366
|
+
|
367
|
+
func setLaneViewBackgroundColor(hexColor: String) {
|
368
|
+
customDayStyle.customLaneViewBackgroundColor = UIColor(hex: hexColor)
|
369
|
+
update()
|
370
|
+
}
|
371
|
+
|
372
|
+
func setNextBannerBackgroundColor(hexColor: String) {
|
373
|
+
customDayStyle.customNextBannerBackgroundColor = UIColor(hex: hexColor)
|
374
|
+
update()
|
375
|
+
}
|
376
|
+
|
377
|
+
func setNextBannerPrimaryTextColor(hexColor: String) {
|
378
|
+
customDayStyle.customNextBannerPrimaryTextColor = UIColor(hex: hexColor)
|
379
|
+
update()
|
380
|
+
}
|
381
|
+
|
382
|
+
func setNextBannerSecondaryTextColor(hexColor: String) {
|
383
|
+
customDayStyle.customNextBannerSecondaryTextColor = UIColor(hex: hexColor)
|
384
|
+
update()
|
385
|
+
}
|
386
|
+
|
387
|
+
func setNextBannerDistanceTextColor(hexColor: String) {
|
388
|
+
customDayStyle.customNextBannerDistanceTextColor = UIColor(hex: hexColor)
|
389
|
+
update()
|
390
|
+
}
|
391
|
+
|
392
|
+
func setProgressBarProgressColor(hexColor: String) {
|
393
|
+
customDayStyle.customProgressBarProgressColor = UIColor(hex: hexColor)
|
394
|
+
update()
|
395
|
+
}
|
396
|
+
|
397
|
+
func setProgressBarBackgroundColor(hexColor: String) {
|
398
|
+
customDayStyle.customProgressBarBackgroundColor = UIColor(hex: hexColor)
|
399
|
+
update()
|
400
|
+
}
|
401
|
+
|
402
|
+
func setManeuverViewPrimaryColor(hexColor: String) {
|
403
|
+
customDayStyle.customManeuverViewPrimaryColor = UIColor(hex: hexColor)
|
404
|
+
update()
|
405
|
+
}
|
406
|
+
|
407
|
+
func setManeuverViewSecondaryColor(hexColor: String) {
|
408
|
+
customDayStyle.customManeuverViewSecondaryColor = UIColor(hex: hexColor)
|
409
|
+
update()
|
410
|
+
}
|
411
|
+
|
412
|
+
func setManeuverViewPrimaryColorHighlighted(hexColor: String) {
|
413
|
+
customDayStyle.customManeuverViewPrimaryColorHighlighted = UIColor(hex: hexColor)
|
414
|
+
update()
|
415
|
+
}
|
416
|
+
|
417
|
+
func setManeuverViewSecondaryColorHighlighted(hexColor: String) {
|
418
|
+
customDayStyle.customManeuverViewSecondaryColorHighlighted = UIColor(hex: hexColor)
|
419
|
+
update()
|
420
|
+
}
|
421
|
+
|
422
|
+
func setInstructionsCardBackgroundColor(hexColor: String) {
|
423
|
+
customDayStyle.customInstructionsCardBackgroundColor = UIColor(hex: hexColor)
|
424
|
+
update()
|
425
|
+
}
|
426
|
+
|
427
|
+
func setInstructionsCardSeparatorColor(hexColor: String) {
|
428
|
+
customDayStyle.customInstructionsCardSeparatorColor = UIColor(hex: hexColor)
|
429
|
+
update()
|
430
|
+
}
|
431
|
+
|
432
|
+
func setInstructionsCardHighlightedSeparatorColor(hexColor: String) {
|
433
|
+
customDayStyle.customInstructionsCardHighlightedSeparatorColor = UIColor(hex: hexColor)
|
434
|
+
update()
|
435
|
+
}
|
436
|
+
|
437
|
+
func setExitViewForegroundColor(hexColor: String) {
|
438
|
+
customDayStyle.customExitViewForegroundColor = UIColor(hex: hexColor)
|
439
|
+
update()
|
440
|
+
}
|
441
|
+
|
442
|
+
func setExitViewBorderColor(hexColor: String) {
|
443
|
+
customDayStyle.customExitViewBorderColor = UIColor(hex: hexColor)
|
444
|
+
update()
|
445
|
+
}
|
446
|
+
|
447
|
+
func setExitViewHighlightColor(hexColor: String) {
|
448
|
+
customDayStyle.customExitViewHighlightColor = UIColor(hex: hexColor)
|
449
|
+
update()
|
450
|
+
}
|
451
|
+
|
452
|
+
func setRouteShieldForegroundColor(hexColor: String) {
|
453
|
+
customDayStyle.customRouteShieldForegroundColor = UIColor(hex: hexColor)
|
454
|
+
update()
|
455
|
+
}
|
456
|
+
|
457
|
+
func setRouteShieldBorderColor(hexColor: String) {
|
458
|
+
customDayStyle.customRouteShieldBorderColor = UIColor(hex: hexColor)
|
459
|
+
update()
|
460
|
+
}
|
461
|
+
|
462
|
+
func setRouteShieldHighlightColor(hexColor: String) {
|
463
|
+
customDayStyle.customRouteShieldHighlightColor = UIColor(hex: hexColor)
|
464
|
+
update()
|
465
|
+
}
|
466
|
+
|
467
|
+
func setDistanceRemainingColor(hexColor: String) {
|
468
|
+
customDayStyle.customDistanceRemainingColor = UIColor(hex: hexColor)
|
469
|
+
update()
|
470
|
+
}
|
471
|
+
|
472
|
+
func setDistanceUnitColor(hexColor: String) {
|
473
|
+
customDayStyle.customDistanceUnitColor = UIColor(hex: hexColor)
|
474
|
+
update()
|
475
|
+
}
|
476
|
+
|
477
|
+
func setDistanceValueColor(hexColor: String) {
|
478
|
+
customDayStyle.customDistanceValueColor = UIColor(hex: hexColor)
|
479
|
+
update()
|
480
|
+
}
|
481
|
+
|
482
|
+
func setRatingControlNormalColor(hexColor: String) {
|
483
|
+
customDayStyle.customRatingControlNormalColor = UIColor(hex: hexColor)
|
484
|
+
update()
|
485
|
+
}
|
486
|
+
|
487
|
+
func setRatingControlSelectedColor(hexColor: String) {
|
488
|
+
customDayStyle.customRatingControlSelectedColor = UIColor(hex: hexColor)
|
489
|
+
update()
|
490
|
+
}
|
491
|
+
|
347
492
|
func update(){
|
348
493
|
calculateRoutesTask?.cancel()
|
349
494
|
|