From 5685e1a80f4cffe253a97c21942b1ed47c6fa5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Boc-Ho?= Date: Wed, 11 Jun 2025 15:05:25 -0300 Subject: [PATCH 1/3] AM - Compatibilidad para ios --- package.json | 21 +- src/app/app.module.ts | 3 - .../datos-utiles/centros-salud/map/map.html | 71 +++--- .../datos-utiles/centros-salud/map/map.ts | 230 +++++------------- .../pages/datos-utiles/datos-utiles.module.ts | 6 +- src/app/pages/turnos/turnos.module.ts | 6 +- src/providers/network.ts | 74 +++--- 7 files changed, 148 insertions(+), 263 deletions(-) diff --git a/package.json b/package.json index e175e6ba..427a8a26 100644 --- a/package.json +++ b/package.json @@ -60,11 +60,10 @@ }, "private": true, "dependencies": { - "@agm/core": "^3.0.0-beta.0", "@angular/common": "~12.2.17", "@angular/core": "~12.2.17", "@angular/forms": "~12.2.17", - "@angular/http": "^7.2.16", + "@angular/google-maps": "^12.2.0", "@angular/platform-browser": "~12.2.17", "@angular/platform-browser-dynamic": "~12.2.17", "@angular/router": "~12.2.17", @@ -95,12 +94,9 @@ "@google/maps": "^1.1.3", "@ionic/angular": "^5.0.0", "@ionic/storage-angular": "^3.0.6", - "@types/google-maps": "^3.2.2", - "agm-core": "^1.0.0-beta.5", "angularx-qrcode": "^10.0.12", "config-cordova": "^0.8.4", "cordova-browser": "6.0.0", - "cordova.plugins.diagnostic": "^6.0.3", "moment": "^2.29.1", "mx.ferreyra.callnumber": "0.0.2", "ng-recaptcha": "^6.1.0", @@ -120,25 +116,23 @@ "@angular/compiler-cli": "~12.2.17", "@angular/language-service": "~12.2.17", "@ionic/angular-toolkit": "^4.0.0", - "@types/googlemaps": "3.39.13", + "@types/google.maps": "^3.49.2", "@types/jasmine": "~3.8.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "@typescript-eslint/eslint-plugin": "^4.28.5", "@typescript-eslint/eslint-plugin-tslint": "^4.28.5", "@typescript-eslint/parser": "^4.28.5", - "@typescript-eslint/utils": "^8.3.0", - "barcodescanner-ec": "^8.1.2", "call-number": "^1.0.1", "codelyzer": "^6.0.0", "com-badrit-base64": "^0.2.0", "cordova-android": "^14.0.0", "cordova-common": "^4.0.2", - "cordova-ios": "^6.2.0", + "cordova-ios": "^7.1.1", "cordova-plugin-advanced-http": "^3.2.2", "cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx-adapter": "^1.1.3", - "cordova-plugin-camera": "6.0.0", + "cordova-plugin-camera": "^7.0.0", "cordova-plugin-device": "^2.0.2", "cordova-plugin-email-composer": "^0.9.2", "cordova-plugin-file": "^6.0.2", @@ -155,6 +149,7 @@ "cordova-sqlite-storage": "^6.0.0", "cordova-support-android-plugin": "^1.0.2", "cordova-support-google-services": "^1.4.1", + "cordova.plugins.diagnostic": "^6.0.3", "eslint": "^7.32.0", "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", @@ -195,7 +190,8 @@ }, "cordova-plugin-firebase-messaging": { "ANDROID_FIREBASE_MESSAGING_VERSION": "21.0.+", - "ANDROIDX_CORE_VERSION": "1.3.+" + "ANDROIDX_CORE_VERSION": "1.3.+", + "IOS_FIREBASE_POD_VERSION": "~> 8.8.0" }, "cordova-plugin-advanced-http": { "ANDROIDBLACKLISTSECURESOCKETPROTOCOLS": "SSLv3,TLSv1" @@ -208,9 +204,6 @@ "cordova-plugin-camera": { "ANDROIDX_CORE_VERSION": "1.6.+" }, - "barcodescanner-ec": { - "ANDROID_SUPPORT_V4_VERSION": "27.+" - }, "call-number": {} }, "platforms": [ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 36eb969d..16056d41 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -44,7 +44,6 @@ import { registerLocaleData } from '@angular/common'; import * as moment from 'moment'; import { HttpClientModule } from '@angular/common/http'; import { VacunasPageModule } from './pages/vacunas/vacunas.module'; -import { HttpModule } from '@angular/http'; import { DescargaArchivosProvider } from 'src/providers/library-services/descarga-archivos'; import { FirebaseMessaging } from '@awesome-cordova-plugins/firebase-messaging/ngx'; import { HTTP } from '@awesome-cordova-plugins/http/ngx'; @@ -60,8 +59,6 @@ moment.locale('es'); IonicModule.forRoot(), AppRoutingModule, IonicStorageModule.forRoot(), - // tslint:disable-next-line: deprecation - HttpModule, HttpClientModule, TurnosPageModule, DatosUtilesPageModule, diff --git a/src/app/pages/datos-utiles/centros-salud/map/map.html b/src/app/pages/datos-utiles/centros-salud/map/map.html index a78fc02f..b69726d4 100644 --- a/src/app/pages/datos-utiles/centros-salud/map/map.html +++ b/src/app/pages/datos-utiles/centros-salud/map/map.html @@ -1,19 +1,24 @@ - - - - - + + + + + + + + + + + +
-

- {{centro.nombre}} -

+

{{centro.nombre}}

@@ -23,7 +28,7 @@

Dirección:

{{centro.direccion.valor}}

+ (click)="navigateTo(centro.direccion.geoReferencia[0], centro.direccion.geoReferencia[1])"> Ver en mapa @@ -42,10 +47,10 @@

{{c.valor}}

Prestaciones:

-

+

{{p.prestacion.term}} - - {{p.detalle}} - {{p.prestacion.term}} + {{p.detalle}} + {{p.prestacion.term}}

@@ -56,24 +61,26 @@

- - - + + + + + + + + + + + - - - - - +
-

- {{centro.nombre}} -

+

{{centro.nombre}}

{{centro.complejidad}}

@@ -92,7 +99,7 @@

Región: {{centro.region}}

- +

Teléfono:

@@ -101,7 +108,7 @@

(+56) {{centro.telefono}}

-
-
-
+ +
+
\ No newline at end of file diff --git a/src/app/pages/datos-utiles/centros-salud/map/map.ts b/src/app/pages/datos-utiles/centros-salud/map/map.ts index d3e14515..395993b1 100644 --- a/src/app/pages/datos-utiles/centros-salud/map/map.ts +++ b/src/app/pages/datos-utiles/centros-salud/map/map.ts @@ -5,137 +5,45 @@ import { GeoProvider } from 'src/providers/library-services/geo-provider'; import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx'; import { Device } from '@awesome-cordova-plugins/device/ngx'; import { ActivatedRoute, Router } from '@angular/router'; -import { AgmInfoWindow, AgmMap } from '@agm/core'; +import { GoogleMap } from '@angular/google-maps'; @Component({ selector: 'app-map', templateUrl: 'map.html', styles: [` - agm-map { + google-map { height: 100%; width: 100%; } `], }) - export class MapPage implements OnDestroy { + @ViewChild(GoogleMap, { static: false }) map: GoogleMap; - @ViewChild('gm') gm: AgmMap; - @ViewChild('infoWindow') infoWindow: AgmInfoWindow; - - /* Es el CS seleccionado en la lista de CS mas cercanos*/ public centroSaludSeleccionado: any; public prestaciones: any = []; public centrosShow: any[] = []; + public center = { - latitude: -38.951625, - longitude: -68.060341 + lat: -38.951625, + lng: -68.060341 }; public centerAraucania = { - latitude: -38.736779, - longitude: -72.598792 + lat: -38.736779, + lng: -72.598792 }; - public userIcon = { - url: './assets/icon/user-marker.svg', - scaledSize: { - width: 21, - height: 30 - } - }; - public locationIcon = { - url: './assets/icon/centro-salud-location.svg', - scaledSize: { - width: 21, - height: 30 - }, + public zoom = 14; + public tipoMapa = ''; + public myPosition = null; + private locationsSubscriptions = null; + public mapOptions: google.maps.MapOptions = { + disableDefaultUI: true, + styles: [/* aquí insertas `this.mapStyles` si lo necesitas */] }; - // Configuración para esconder elementos en el mapa (los mostramos con íconos propios) - public mapStyles = [ - { - featureType: 'poi', - elementType: 'labels.text', - stylers: [ - { - visibility: 'off' - } - ] - }, - { - featureType: 'poi.business', - stylers: [ - { - visibility: 'off' - } - ] - }, - { - featureType: 'poi.school', - stylers: [ - { - visibility: 'off' - } - ] - }, - { - featureType: 'poi.sports_complex', - stylers: [ - { - visibility: 'off' - } - ] - }, - { - featureType: 'road', - elementType: 'labels.icon', - stylers: [ - { - visibility: 'off' - } - ] - }, - { - featureType: 'transit', - stylers: [ - { - visibility: 'off' - } - ] - } - ]; - - myPosition = null; - lastWindow: AgmInfoWindow; - - // Tamaños corregidos según tipo de ícono - // #32b9ec - markerSizes = [ - { - name: 'centro-salud', - scaledSize: { - width: 21, - height: 30 - } - }, - { - name: 'araucania', - scaledSize: { - width: 21, - height: 30 - } - }, - { - name: 'vacunatorio', - scaledSize: { - width: 70, - height: 90 - } - }, - ]; - constructor( private navParams: NavParams, private maps: GeoProvider, @@ -145,12 +53,7 @@ export class MapPage implements OnDestroy { private device: Device, private alertCtrl: AlertController, private router: Router, - private route: ActivatedRoute) { - } - - public zoom = 14; - private locationsSubscriptions = null; - public tipoMapa = ''; + private route: ActivatedRoute) { } ngOnDestroy() { if (this.locationsSubscriptions) { @@ -158,52 +61,28 @@ export class MapPage implements OnDestroy { } } - onClickCentro(centro, infoWindow) { - if (this.lastWindow) { - this.lastWindow.close(); - } - this.lastWindow = infoWindow; - (centro.ofertaPrestacional) ? this.prestaciones = centro.ofertaPrestacional : this.prestaciones = []; - } - - toPrestaciones(centro) { - this.router.navigate(['cs-prestaciones'], { queryParams: { centroSalud: JSON.stringify(centro) } }); - } - - navigateTo(longitud, latitud) { - if (this.platform.is('ios')) { - window.open('maps://?q=' + longitud + ',' + latitud, '_system'); - } - if (this.platform.is('android')) { - window.open('geo:?q=' + longitud + ',' + latitud); - } - } - ionViewDidEnter() { this.route.queryParams.subscribe(params => { this.tipoMapa = params.tipo; - this.locationIcon.url = `./assets/icon/${this.tipoMapa}-location.svg`; - this.locationIcon.scaledSize = this.markerSizes.find(size => size.name === this.tipoMapa).scaledSize; }); this.centroSaludSeleccionado = this.navParams.get('centroSeleccionado'); + this.platform.ready().then(() => { this.centrosShow = []; + if (this.tipoMapa === 'centro-salud') { this.locationsSubscriptions = this.locations.getV2().subscribe((centros: any) => { this.centrosShow = centros.filter(unCentro => this.noTieneConfiguracionesMapa(unCentro)); }); - } else { - if (this.tipoMapa === 'araucania') { - this.locationsSubscriptions = this.locations.getCentrosAraucania().subscribe((centros: any) => { - this.centrosShow = centros; - }); - } + } else if (this.tipoMapa === 'araucania') { + this.locationsSubscriptions = this.locations.getCentrosAraucania().subscribe((centros: any) => { + this.centrosShow = centros; + }); } if (this.platform.is('cordova')) { this.diagnostic.isLocationEnabled().then((available) => { - if (!available) { this.requestGeoRef(); } else { @@ -211,7 +90,7 @@ export class MapPage implements OnDestroy { } setTimeout(() => { - this.gm.triggerResize(); + this.map?.panTo(this.center); }, 1000); }, (error) => { console.error(error); @@ -219,17 +98,12 @@ export class MapPage implements OnDestroy { } else { this.geoPosicionarme(); } - }).catch((error: any) => { - console.error(error); }); - - } + noTieneConfiguracionesMapa(unCentro: any) { - if (!unCentro.configuraciones || unCentro.configuraciones && - (!unCentro.configuraciones.vacunatorio || !unCentro.configuraciones.detectar)) { - return true; - } + const conf = unCentro.configuraciones; + return !conf || (!conf.vacunatorio && !conf.detectar); } async requestGeoRef() { @@ -240,10 +114,9 @@ export class MapPage implements OnDestroy { text: 'Continuar', handler: () => { this.diagnostic.switchToLocationSettings(); - this.diagnostic.registerLocationStateChangeHandler( - (state) => { - this.hayUbicacion(state); - }); + this.diagnostic.registerLocationStateChangeHandler((state) => { + this.hayUbicacion(state); + }); } }] }); @@ -251,12 +124,13 @@ export class MapPage implements OnDestroy { } hayUbicacion(state) { - if ((this.device.platform === 'Android' && state !== this.diagnostic.locationMode.LOCATION_OFF) - || (this.device.platform === 'iOS') && (state === this.diagnostic.permissionStatus.GRANTED - || state === this.diagnostic.permissionStatus.GRANTED_WHEN_IN_USE - )) { - this.geoPosicionarme(); + const isAndroid = this.device.platform === 'Android'; + const isIOS = this.device.platform === 'iOS'; + const granted = this.diagnostic.permissionStatus.GRANTED; + if ((isAndroid && state !== this.diagnostic.locationMode.LOCATION_OFF) + || (isIOS && (state === granted || state === this.diagnostic.permissionStatus.GRANTED_WHEN_IN_USE))) { + this.geoPosicionarme(); } } @@ -264,19 +138,35 @@ export class MapPage implements OnDestroy { this.maps.getGeolocation().then((position: any) => { this.myPosition = position.coords; this.maps.setActual(this.myPosition); - if (this.tipoMapa === 'centro-salud') { - // Si me geolocaliza, centra el mapa donde estoy - this.center.latitude = this.myPosition.latitude; - this.center.longitude = this.myPosition.longitude; - } else { - if (this.tipoMapa === 'araucania') { - this.center = this.centerAraucania; - } + if (this.tipoMapa === 'centro-salud') { + this.center = { + lat: this.myPosition.latitude, + lng: this.myPosition.longitude + }; + } else if (this.tipoMapa === 'araucania') { + this.center = this.centerAraucania; } + this.map?.panTo(this.center); + }); + } + + onClickCentro(centro: any) { + (centro.ofertaPrestacional) ? this.prestaciones = centro.ofertaPrestacional : this.prestaciones = []; + } + toPrestaciones(centro) { + this.router.navigate(['cs-prestaciones'], { + queryParams: { centroSalud: JSON.stringify(centro) } }); } -} + navigateTo(longitud, latitud) { + const url = this.platform.is('ios') ? + `maps://?q=${longitud},${latitud}` : + `geo:?q=${longitud},${latitud}`; + + window.open(url, '_system'); + } +} diff --git a/src/app/pages/datos-utiles/datos-utiles.module.ts b/src/app/pages/datos-utiles/datos-utiles.module.ts index f6f39819..5312855a 100644 --- a/src/app/pages/datos-utiles/datos-utiles.module.ts +++ b/src/app/pages/datos-utiles/datos-utiles.module.ts @@ -17,7 +17,6 @@ import { CentrosSaludPrestacionesPage } from './centros-salud/centros-salud-pres import { MapPage } from './centros-salud/map/map'; import { ListPage } from './centros-salud/list/list'; import { FaqPage } from './faq/faq'; -import { AgmCoreModule } from '@agm/core'; import { ENV } from '@app/env'; import { Geolocation } from '@awesome-cordova-plugins/geolocation/ngx'; import { GeoProvider } from 'src/providers/library-services/geo-provider'; @@ -30,10 +29,7 @@ import { NumerosUtilesPage } from './numeros-emergencia/numeros-utiles'; FormsModule, AdsModule, IonicModule, - DatosUtilesPageRoutingModule, - AgmCoreModule.forRoot({ - apiKey: ENV.MAP_KEY - }) + DatosUtilesPageRoutingModule ], declarations: [ DatosUtilesPage, diff --git a/src/app/pages/turnos/turnos.module.ts b/src/app/pages/turnos/turnos.module.ts index b20d9a5b..f18052c8 100644 --- a/src/app/pages/turnos/turnos.module.ts +++ b/src/app/pages/turnos/turnos.module.ts @@ -15,7 +15,6 @@ import { NotificacionTurnoPage } from './notificaciones/notificacion-turno.page' import { EnumerarPipe } from 'src/pipes/enumerar.pipe'; import { AdsModule } from 'src/app/ads/ads.module'; import { MapTurnosPage } from './mapa/mapa'; -import { AgmCoreModule } from '@agm/core'; import { ENV } from '@app/env'; @NgModule({ @@ -24,10 +23,7 @@ import { ENV } from '@app/env'; FormsModule, IonicModule, AdsModule, - TurnosPageRoutingModule, - AgmCoreModule.forRoot({ - apiKey: ENV.MAP_KEY - }) + TurnosPageRoutingModule ], declarations: [ TurnosPage, diff --git a/src/providers/network.ts b/src/providers/network.ts index 4aff5c67..e8c3ec49 100644 --- a/src/providers/network.ts +++ b/src/providers/network.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Http, Headers } from '@angular/http'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; // providers import { ToastProvider } from './toast'; @@ -23,7 +23,7 @@ export class NetworkProvider { private status: BehaviorSubject = new BehaviorSubject(ConnectionStatus.Offline); constructor( - public http: Http, + public http: HttpClient, private toastProvider: ToastProvider, private toastController: ToastController, private network: Network, @@ -62,63 +62,69 @@ export class NetworkProvider { return headers; } - request(url, data, options = null) { + request(url: string, data: any, options: any = null): Promise { return new Promise((resolve, reject) => { - const headers = this.getHeaders(); - const config = { - ...data, - headers + const headers = this.getHeaders(); // Esto debe retornar un objeto de tipo HttpHeaders + const config: any = { + headers, + ...options }; - this.http.request(this.baseUrl + url, config) - .subscribe(res => { - resolve(res.json()); - }, (err) => { + + this.http.request('POST', this.baseUrl + url, { + ...config, + body: data // Aquí va el cuerpo de la petición + }).subscribe({ + next: (res) => { + resolve(res); // res ya es JSON + }, + error: (err) => { if (err.status === 0) { if (!options || !options.hideNoNetwork) { this.toastProvider.danger( - 'Andes se encuentra momentáneamente fuera de servicio. Vuelva a intentar mas tarde.' + 'Andes se encuentra momentáneamente fuera de servicio. Vuelva a intentar más tarde.' ); } - reject(); + reject(); // sin datos, solo error de red } else { - try { - reject(err.json()); - } catch (e) { - reject({ error: err }); - } + // err.error ya contiene el JSON parseado automáticamente + reject(err.error || err); } - }); + } + }); }); } - requestMobileApi(url, data, options = null) { + requestMobileApi(url: string, data: any, options: any = null): Promise { return new Promise((resolve, reject) => { - const headers = this.getHeaders(); - const config = { - ...data, - headers + const headers = this.getHeaders(); // Debe devolver un HttpHeaders + const config: any = { + headers, + ...options }; - this.http.request(this.ApiMobileUrl + url, config) - .subscribe(res => { - resolve(res.json()); - }, (err) => { + + this.http.request('POST', this.ApiMobileUrl + url, { + ...config, + body: data + }).subscribe({ + next: (res) => { + resolve(res); // res ya es JSON automáticamente + }, + error: (err) => { if (err.status === 0) { if (!options || !options.hideNoNetwork) { this.toastProvider.danger('No hay conexión para actualizar datos'); } reject(); } else { - try { - reject(err.json()); - } catch (e) { - reject({ error: err }); - } + reject(err.error || err); } - }); + } + }); }); } + get(url, params = {}, options = null) { return this.request(url, { params, method: 'GET' }, options); } From e4cbdf91cdfeb6018a2b8137259a6cd0fbc69782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Boc-Ho?= Date: Thu, 12 Jun 2025 11:16:44 -0300 Subject: [PATCH 2/3] Se corrigue html --- src/app/pages/datos-utiles/centros-salud/map/map.html | 8 ++++---- src/app/pages/datos-utiles/datos-utiles.module.ts | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/pages/datos-utiles/centros-salud/map/map.html b/src/app/pages/datos-utiles/centros-salud/map/map.html index b69726d4..14ca7020 100644 --- a/src/app/pages/datos-utiles/centros-salud/map/map.html +++ b/src/app/pages/datos-utiles/centros-salud/map/map.html @@ -4,13 +4,13 @@ height="100%" width="100%"> - + + (mapClick)="onClickCentro(centro)"> @@ -69,11 +69,11 @@

- + + (mapClick)="onClickCentro(centro)">
diff --git a/src/app/pages/datos-utiles/datos-utiles.module.ts b/src/app/pages/datos-utiles/datos-utiles.module.ts index 5312855a..47d3d9d2 100644 --- a/src/app/pages/datos-utiles/datos-utiles.module.ts +++ b/src/app/pages/datos-utiles/datos-utiles.module.ts @@ -15,6 +15,7 @@ import { FeedNoticiasPage } from './feed-noticias/feed-noticias'; import { CentrosSaludPage } from './centros-salud/centros-salud'; import { CentrosSaludPrestacionesPage } from './centros-salud/centros-salud-prestaciones'; import { MapPage } from './centros-salud/map/map'; +import { GoogleMapsModule } from '@angular/google-maps'; import { ListPage } from './centros-salud/list/list'; import { FaqPage } from './faq/faq'; import { ENV } from '@app/env'; @@ -29,7 +30,8 @@ import { NumerosUtilesPage } from './numeros-emergencia/numeros-utiles'; FormsModule, AdsModule, IonicModule, - DatosUtilesPageRoutingModule + DatosUtilesPageRoutingModule, + GoogleMapsModule ], declarations: [ DatosUtilesPage, From bcde0574ab9a095451423d08e2a637d9907c34cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Boc-Ho?= Date: Wed, 18 Jun 2025 09:32:01 -0300 Subject: [PATCH 3/3] Se corrigue mapa --- src/app/pages/turnos/mapa/mapa.html | 23 +++++++++++++---------- src/app/pages/turnos/mapa/mapa.ts | 10 +++++++++- src/app/pages/turnos/turnos.module.ts | 5 +++-- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/app/pages/turnos/mapa/mapa.html b/src/app/pages/turnos/mapa/mapa.html index 05d845df..3285cf00 100644 --- a/src/app/pages/turnos/mapa/mapa.html +++ b/src/app/pages/turnos/mapa/mapa.html @@ -1,20 +1,23 @@ - - - + + + + +
- {{centro.nombre}} + {{ centro.nombre }}
- Dirección: {{centro.domicilio.direccion}} + Dirección: {{ centro.domicilio.direccion }}
-
-
-
-
+ + + + + \ No newline at end of file diff --git a/src/app/pages/turnos/mapa/mapa.ts b/src/app/pages/turnos/mapa/mapa.ts index 97b7e628..667b845e 100644 --- a/src/app/pages/turnos/mapa/mapa.ts +++ b/src/app/pages/turnos/mapa/mapa.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Platform } from '@ionic/angular'; -import { CheckerGpsProvider } from 'src/providers/locations/checkLocation'; +import { GoogleMap } from '@angular/google-maps'; import { ActivatedRoute } from '@angular/router'; @Component({ @@ -21,6 +21,14 @@ export class MapTurnosPage implements OnDestroy, OnInit { centro: any = null; public zoom = 14; private locationsSubscriptions = null; + hospitalIcon = { + url: 'assets/icon/centro-salud-location.png', + scaledSize: new google.maps.Size(40, 40) + }; + public center = { + lat: -38.951625, + lng: -68.060341 + }; constructor( private platform: Platform, diff --git a/src/app/pages/turnos/turnos.module.ts b/src/app/pages/turnos/turnos.module.ts index f18052c8..b93b690a 100644 --- a/src/app/pages/turnos/turnos.module.ts +++ b/src/app/pages/turnos/turnos.module.ts @@ -15,7 +15,7 @@ import { NotificacionTurnoPage } from './notificaciones/notificacion-turno.page' import { EnumerarPipe } from 'src/pipes/enumerar.pipe'; import { AdsModule } from 'src/app/ads/ads.module'; import { MapTurnosPage } from './mapa/mapa'; -import { ENV } from '@app/env'; +import { GoogleMapsModule } from '@angular/google-maps'; @NgModule({ imports: [ @@ -23,7 +23,8 @@ import { ENV } from '@app/env'; FormsModule, IonicModule, AdsModule, - TurnosPageRoutingModule + TurnosPageRoutingModule, + GoogleMapsModule ], declarations: [ TurnosPage,