From 76dbad46211cde4b36b29492df37c14687e5d5c3 Mon Sep 17 00:00:00 2001 From: Benjamin Gerber Date: Fri, 20 Sep 2024 15:29:16 +0200 Subject: [PATCH] Fix search example --- examples/search.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/search.js b/examples/search.js index d44447484a64..6a971eeb93be 100644 --- a/examples/search.js +++ b/examples/search.js @@ -25,7 +25,7 @@ import angular from 'angular'; import {SEARCH} from './url'; import gmfMapComponent from 'gmf/map/component'; import options from './options'; -import {proj as EPSG2056} from 'ngeo/proj/EPSG_2056'; +import EPSG2056 from 'ngeo/proj/EPSG_2056'; import ngeoSearchModule from 'ngeo/search/module'; import olMap from 'ol/Map'; import olView from 'ol/View'; @@ -121,7 +121,7 @@ function SearchController($element, $rootScope, $compile, ngeoSearchCreateGeoJSO window.alert(feature.get('label')); event.stopPropagation(); }; - const html = `

${feature.get('label')}

`; + const html = `

${feature.get('label')}

`; return $compile(html)(scope).html(); }, }, @@ -195,7 +195,12 @@ SearchController.prototype.createVectorLayer_ = function () { */ SearchController.prototype.createAndInitBloodhound_ = function (ngeoSearchCreateGeoJSONBloodhound) { const url = SEARCH; - const bloodhound = ngeoSearchCreateGeoJSONBloodhound(url, undefined, olProj.get('EPSG:3857'), EPSG2056); + const bloodhound = ngeoSearchCreateGeoJSONBloodhound( + url, + undefined, + olProj.get('EPSG:3857'), + olProj.get(EPSG2056), + ); bloodhound.initialize(); return bloodhound; };