Skip to content

Commit

Permalink
Fix passage en mode Feature (vs FeatureRender) pour le contrôle Layer…
Browse files Browse the repository at this point in the history
…Import
  • Loading branch information
lowzonenose committed Jul 13, 2022
1 parent 65896f7 commit 0a863d9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/OpenLayers/Controls/LayerImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "../CSS/Controls/LayerImport/GPimportOpenLayers.css";
import Control from "ol/control/Control";
import { unByKey as olObservableUnByKey } from "ol/Observable";
import Collection from "ol/Collection";
// import RenderFeature from "ol/render/Feature"; // FIXME RenderFeature n'est pas dispo dans le bundle !?
import Feature from "ol/Feature";
import WMTSTileGrid from "ol/tilegrid/WMTS";
import { createXYZ as olCreateXYZTileGrid } from "ol/tilegrid"; // FIXME olCreateXYZTileGrid !?
import {
Expand Down Expand Up @@ -1201,7 +1201,9 @@ var LayerImport = (function (Control) {

if (_glTiles) {
// service tuilé et/ou mapbox
vectorFormat = new MVT(/* { featureClass : RenderFeature } */);
vectorFormat = new MVT({
featureClass : Feature
});
vectorSource = new VectorTileSource({
attributions : _glSource.attribution,
format : vectorFormat,
Expand Down Expand Up @@ -1239,7 +1241,9 @@ var LayerImport = (function (Control) {
vectorLayer.gpResultLayerId = "layerimport:" + this._currentImportType;
} else if (_glUrl) {
// service avec un tilejson
vectorFormat = new MVT(/* { featureClass : RenderFeature } */);
vectorFormat = new MVT({
featureClass : Feature
});
vectorLayer = new VectorTileLayer({
visible : false,
// zIndex : 0
Expand Down

0 comments on commit 0a863d9

Please sign in to comment.