Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0 alpha #12

Merged
merged 18 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# [1.0.0-alpha.6](https://github.com/infra-geo-ouverte/igo2-lib/compare/1.0.0-alpha.5...1.0.0-alpha.6) (2019-08-15)


### Bug Fixes

* minors bugs ([f79de3d](https://github.com/infra-geo-ouverte/igo2-lib/commit/f79de3d))
* **context-list:** dectect change ([ecf80c8](https://github.com/infra-geo-ouverte/igo2-lib/commit/ecf80c8))
* **layer-list:** id missing ([7c801fe](https://github.com/infra-geo-ouverte/igo2-lib/commit/7c801fe))



# [1.0.0-alpha.5](https://github.com/infra-geo-ouverte/igo2-lib/compare/1.0.0-alpha.4...1.0.0-alpha.5) (2019-08-13)


Expand Down
14 changes: 12 additions & 2 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserModule, DomSanitizer } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import {} from '@angular/platform-browser';
import {
MatIconRegistry,
MatSidenavModule,
MatToolbarModule,
MatButtonModule,
Expand Down Expand Up @@ -98,4 +100,12 @@ import { AppComponent } from './app.component';
],
bootstrap: [AppComponent]
})
export class AppModule {}
export class AppModule {
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) {
matIconRegistry.addSvgIconSet(
domSanitizer.bypassSecurityTrustResourceUrl(
'./assets/igo2/core/icons/mdi.svg'
)
);
}
}
5 changes: 4 additions & 1 deletion demo/src/app/core/request/request.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Component } from '@angular/core';
import { HttpClient } from '@angular/common/http';

import { LanguageService } from '@igo2/core';


@Component({
selector: 'app-request',
templateUrl: './request.component.html',
styleUrls: ['./request.component.scss']
})
export class AppRequestComponent {
constructor(private http: HttpClient) {}
constructor(private http: HttpClient, public languageService: LanguageService) {}

callHttp() {
const url = '/locale/en.json';
Expand Down
3 changes: 2 additions & 1 deletion demo/src/app/core/request/request.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { MatCardModule, MatButtonModule } from '@angular/material';

import { IgoLoggingModule, IgoErrorModule } from '@igo2/core';
import { IgoErrorModule, IgoLanguageModule } from '@igo2/core';

import { AppRequestComponent } from './request.component';
import { AppRequestRoutingModule } from './request-routing.module';
Expand All @@ -14,6 +14,7 @@ import { AppRequestRoutingModule } from './request-routing.module';
MatCardModule,
MatButtonModule,
HttpClientModule,
IgoLanguageModule.forRoot(),
IgoErrorModule.forRoot() // Only if you want register errors from http call in console
// IgoLoggingModule.forRoot() // Only if you want register http calls in console
],
Expand Down
6 changes: 4 additions & 2 deletions demo/src/app/geo/directions/directions.component.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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',
Expand Down
2 changes: 0 additions & 2 deletions demo/src/app/geo/feature/feature.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
MatIconModule
} from '@angular/material';

import { IgoCoreModule } from '@igo2/core';
import { IgoPanelModule, IgoEntityTableModule } from '@igo2/common';
import { IgoMapModule, IgoFeatureModule } from '@igo2/geo';

Expand All @@ -21,7 +20,6 @@ import { AppFeatureRoutingModule } from './feature-routing.module';
MatCardModule,
MatButtonModule,
MatIconModule,
IgoCoreModule,
IgoPanelModule,
IgoEntityTableModule,
IgoMapModule,
Expand Down
2 changes: 0 additions & 2 deletions demo/src/app/geo/measure/measure.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NgModule } from '@angular/core';
import { MatCardModule } from '@angular/material';

import { IgoCoreModule } from '@igo2/core';
import { IgoMapModule, IgoMeasureModule } from '@igo2/geo';

import { AppMeasureComponent } from './measure.component';
Expand All @@ -12,7 +11,6 @@ import { AppMeasureRoutingModule } from './measure-routing.module';
imports: [
AppMeasureRoutingModule,
MatCardModule,
IgoCoreModule,
IgoMapModule,
IgoMeasureModule
],
Expand Down
3 changes: 3 additions & 0 deletions demo/src/app/geo/search/search.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<igo-panel title="Search">
<igo-search-bar
[searchSettings]="true"
(change)="onSearchTermChange($event)"
(search)="onSearch($event)"
(clearFeature)="removeFeatureFromMap()">
Expand Down Expand Up @@ -50,3 +51,5 @@
[mode]="'context'">
</igo-actionbar>
</ng-template>

<igo-message-center></igo-message-center>
4 changes: 4 additions & 0 deletions demo/src/app/geo/search/search.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ import {
MatTooltipModule
} from '@angular/material';

import { IgoMessageModule } from '@igo2/core';

import {
IgoPanelModule,
IgoActionbarModule,
IgoContextMenuModule
} from '@igo2/common';

import {
IgoFeatureModule,
IgoMapModule,
Expand All @@ -38,6 +41,7 @@ import { AppSearchRoutingModule } from './search-routing.module';
MatButtonModule,
MatIconModule,
MatTooltipModule,
IgoMessageModule.forRoot(),
IgoPanelModule,
IgoMapModule,
IgoSearchModule.forRoot(),
Expand Down
17 changes: 17 additions & 0 deletions demo/src/contexts/_base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"map": {
"view": {
"projection": "EPSG:3857",
"center": [-72, 50],
"zoom": 8
}
},
"layers": [
{
"title": "OSM",
"sourceOptions": {
"type": "osm"
}
}
]
}
15 changes: 1 addition & 14 deletions demo/src/contexts/_default.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
{
"uri": "_default",
"title": "Default Context",
"map": {
"view": {
"projection": "EPSG:3857",
"center": [-72, 50],
"zoom": 8
}
},
"base": "_base",
"layers": [
{
"title": "OSM",
"sourceOptions": {
"type": "osm"
}
},
{
"sourceOptions": {
"type": "wms",
Expand Down
1 change: 0 additions & 1 deletion demo/src/contexts/context2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"uri": "context2",
"title": "Context 2",
"map": {
"view": {
"projection": "EPSG:3857",
Expand Down
1 change: 0 additions & 1 deletion demo/src/contexts/context3.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"uri": "context3",
"title": "CARTO examples",
"map": {
"view": {
"projection": "EPSG:3857",
Expand Down
1 change: 0 additions & 1 deletion demo/src/contexts/context4.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"uri": "context4",
"title": "ArcGIS / TileArcGIS Rest examples ",
"map": {
"view": {
"projection": "EPSG:3857",
Expand Down
36 changes: 12 additions & 24 deletions demo/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,28 @@ export const environment: Environment = {
},
searchSources: {
nominatim: {
enabled: false,
disabled: true
},
reseautq: {
searchUrl: 'https://ws.mapserver.transports.gouv.qc.ca/swtq',
locateUrl: 'https://ws.mapserver.transports.gouv.qc.ca/swtq',
limit: 5,
locateLimit: 15,
zoomMaxOnSelect: 8,
enabled: false,
propertiesAlias: [
{ name: 'title', alias: 'Titre' },
{ name: 'etiquette', alias: 'Informations' },
{ name: 'nommun', alias: 'Municipalité' },
{ name: 'messagpan', alias: 'Message' },
{ name: 'noroute', alias: '# de route' },
{ name: 'nosortie', alias: '# de sortie' },
{ name: 'direction', alias: 'Direction' },
{ name: 'typesort', alias: 'Type de sortie' }
],
distance: 0.5
enabled: true
},
icherche: {
searchUrl: '/apis/icherche/geocode',
zoomMaxOnSelect: 10,
enabled: true
order: 2,
enabled: true,
params: {
limit: '8'
}
},
icherchereverse: {
searchUrl: '/apis/territoires/locate',
order: 3,
enabled: true
},
ilayer: {
searchUrl: '/apis/layers/search',
enabled: true
order: 4,
enabled: true,
params: {
limit: '5'
}
}
}
}
Expand Down
Loading