Skip to content

Commit ccaa8b8

Browse files
committed
correction source wfs et ajout geolocalisation
1 parent 76ed92d commit ccaa8b8

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed
-2.05 MB
Binary file not shown.
2.05 MB
Binary file not shown.

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"@edugouvfr/ngx-dsfr": "^1.12.6",
1414
"@gouvfr/dsfr": "^1.11.0",
15-
"geopf-extensions-openlayers": "./lib/geopf-extensions-openlayers-1.0.0-beta.3-388.tgz",
15+
"geopf-extensions-openlayers": "./lib/geopf-extensions-openlayers-1.0.0-beta.3-390.tgz",
1616
"geoportal-access-lib": "^3.4.4",
1717
"ol": "^10.3.1",
1818
"opening_hours": "^3.8.0"

src/app/controls/search/search.component.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { SearchEngine, Searchdialog} from "geopf-extensions-openlayers/src";
88
selector: 'app-search',
99
standalone: true,
1010
template: '',
11-
styles: ['']
11+
styles: ['::ng-deep .geolocatebutton { left: 2px; top: 2px; background-color: white }']
1212
})
1313
export class SearchComponent implements OnInit {
1414
@Input() map!: Map;
@@ -30,6 +30,7 @@ export class SearchComponent implements OnInit {
3030
this.search = new SearchEngine({
3131
displayButtonClose: false,
3232
displayButtonAdvancedSearch: false,
33+
displayButtonGeolocate: true,
3334
collapsible: true,
3435
splitResults: false,
3536
markerStyle: 'turquoiseBlue',
@@ -51,5 +52,15 @@ export class SearchComponent implements OnInit {
5152
}
5253
});
5354
this.map.addControl(this.search);
55+
56+
//console.log(document.querySelector('[id^=GPshowGeolocate-]'));
57+
const geolocatebutton = document.querySelector('[id^=GPshowGeolocate-]');
58+
if(geolocatebutton){
59+
geolocatebutton.classList.add("gpf-widget", "gpf-widget-button", "fr-btn--tertiary", "geolocatebutton")
60+
geolocatebutton.classList.remove("fr-m-1w", "fr-btn--secondary");
61+
geolocatebutton.setAttribute('title', "Activer la géolocalisation");
62+
}
63+
//@ts-ignore
64+
document.getElementById("position-container-bottom-right")?.appendChild(geolocatebutton);
5465
}
5566
}

src/assets/customConfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5618,7 +5618,7 @@
56185618
"id": "OGC:WFS",
56195619
"version": "2.0.0",
56205620
"serverUrl": {
5621-
"BrB93jFFpz4UXZOQZzu1sVLCBjqiS4HN": "https://data.geopf.fr/private/wfs/wfs"
5621+
"BrB93jFFpz4UXZOQZzu1sVLCBjqiS4HN": "https://data.geopf.fr/private/wfs"
56225622
}
56235623
},
56245624
"defaultProjection": "EPSG:2154",
@@ -5652,7 +5652,7 @@
56525652
"id": "OGC:WFS",
56535653
"version": "2.0.0",
56545654
"serverUrl": {
5655-
"BrB93jFFpz4UXZOQZzu1sVLCBjqiS4HN": "https://data.geopf.fr/private/wfs/wfs"
5655+
"BrB93jFFpz4UXZOQZzu1sVLCBjqiS4HN": "https://data.geopf.fr/private/wfs"
56565656
}
56575657
},
56585658
"defaultProjection": "EPSG:2154",

0 commit comments

Comments
 (0)