From d7d34e58706e644c5caf780814db1d2d1a93ee84 Mon Sep 17 00:00:00 2001 From: davidboucher-28 <53181729+davidboucher-28@users.noreply.github.com> Date: Fri, 16 Aug 2019 16:28:02 -0400 Subject: [PATCH] fix(routing): fix icone, padding, recherche textuelle, label (#388) --- .../geo/directions/directions.component.ts | 6 ++- .../src/lib/overlay/shared/overlay.utils.ts | 3 +- .../routing-form/routing-form.component.html | 22 +++++----- .../routing-form/routing-form.component.scss | 12 +++++ .../routing-form/routing-form.component.ts | 44 +++++++++---------- 5 files changed, 51 insertions(+), 36 deletions(-) diff --git a/demo/src/app/geo/directions/directions.component.ts b/demo/src/app/geo/directions/directions.component.ts index b122ba6460..050ffd4354 100644 --- a/demo/src/app/geo/directions/directions.component.ts +++ b/demo/src/app/geo/directions/directions.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { LanguageService } from '@igo2/core'; -import { IgoMap, LayerService } from '@igo2/geo'; +import { IgoMap, LayerService, MapService } from '@igo2/geo'; @Component({ selector: 'app-directions', @@ -25,8 +25,10 @@ export class AppDirectionsComponent { constructor( private languageService: LanguageService, - private layerService: LayerService + private layerService: LayerService, + private mapService: MapService ) { + this.mapService.setMap(this.map); this.layerService .createAsyncLayer({ title: 'Quebec Base Map', diff --git a/packages/geo/src/lib/overlay/shared/overlay.utils.ts b/packages/geo/src/lib/overlay/shared/overlay.utils.ts index dcc2879103..73e9a2c47c 100644 --- a/packages/geo/src/lib/overlay/shared/overlay.utils.ts +++ b/packages/geo/src/lib/overlay/shared/overlay.utils.ts @@ -70,7 +70,7 @@ function createOverlayDefaultStyle(): olstyle.Style { * Create a marker style for points * @returns Style */ -export function createOverlayMarkerStyle(color = 'blue'): olstyle.Style { +export function createOverlayMarkerStyle(color = 'blue', text?): olstyle.Style { let iconColor; switch (color) { case 'blue': @@ -90,6 +90,7 @@ export function createOverlayMarkerStyle(color = 'blue'): olstyle.Style { anchor: [0.5, 1] }), text: new olstyle.Text({ + text, font: '12px Calibri,sans-serif', fill: new olstyle.Fill({ color: '#000' }), stroke: new olstyle.Stroke({ color: '#fff', width: 3 }), diff --git a/packages/geo/src/lib/routing/routing-form/routing-form.component.html b/packages/geo/src/lib/routing/routing-form/routing-form.component.html index 8820b2f133..16a5419c47 100644 --- a/packages/geo/src/lib/routing/routing-form/routing-form.component.html +++ b/packages/geo/src/lib/routing/routing-form/routing-form.component.html @@ -14,14 +14,14 @@ (focus)="focus(i)" (keyup)="keyup(i,$event)"> - - - {{ result.title }} + + + {{ result.meta ? result.meta.title : '' }} - @@ -50,7 +50,7 @@