Skip to content

Commit

Permalink
ApiKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Nour-Cheour10 committed Jul 24, 2024
1 parent 9948b7f commit e1721d7
Showing 1 changed file with 56 additions and 41 deletions.
97 changes: 56 additions & 41 deletions src/geotifflayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import GeoTIFF from 'ol/source/GeoTIFF.js';
import { MODULE_NAME, MODULE_VERSION } from './version';
import { LayerModel, LayerView } from './layer';

<<<<<<< HEAD
<<<<<<< HEAD
export class GeoTIFFTileLayerModel extends LayerModel {
defaults() {
Expand Down Expand Up @@ -66,57 +67,68 @@ export class GeoTIFFTileLayerView extends LayerView {
obj: WebGLTileLayer;
=======

=======
>>>>>>> 06de91b (ApiKey)
export class GeoTIFFTileLayerModel extends LayerModel {
defaults() {
return {
...super.defaults(),
_model_name: GeoTIFFTileLayerModel.model_name,
_model_module: GeoTIFFTileLayerModel.model_module,
_model_module_version: GeoTIFFTileLayerModel.model_module_version,
_view_name: GeoTIFFTileLayerModel.view_name,
_view_module: GeoTIFFTileLayerModel.view_module,
_view_module_version: GeoTIFFTileLayerModel.view_module_version,
source: [],
};
}


static serializers: ISerializers = {
...DOMWidgetModel.serializers,
// Add any extra serializers here
};
defaults() {
return {
...super.defaults(),
_model_name: GeoTIFFTileLayerModel.model_name,
_model_module: GeoTIFFTileLayerModel.model_module,
_model_module_version: GeoTIFFTileLayerModel.model_module_version,
_view_name: GeoTIFFTileLayerModel.view_name,
_view_module: GeoTIFFTileLayerModel.view_module,
_view_module_version: GeoTIFFTileLayerModel.view_module_version,
source: [],
};
}

static serializers: ISerializers = {
...DOMWidgetModel.serializers,
// Add any extra serializers here
};

static model_name = 'GeoTIFFTileLayerModel';
static model_module = MODULE_NAME;
static model_module_version = MODULE_VERSION;
static view_name = 'GeoTIFFTileLayerView';
static view_module = MODULE_NAME;
static view_module_version = MODULE_VERSION;
static model_name = 'GeoTIFFTileLayerModel';
static model_module = MODULE_NAME;
static model_module_version = MODULE_VERSION;
static view_name = 'GeoTIFFTileLayerView';
static view_module = MODULE_NAME;
static view_module_version = MODULE_VERSION;
}


export class GeoTIFFTileLayerView extends LayerView {
render() {
super.render();
this.sourcesChanged();
this.model.on('change:sources', this.sourcesChanged, this);
}

render() {
super.render();
this.sourcesChanged();
this.model.on('change:sources', this.sourcesChanged, this);
}

create_obj() {
const sources = this.model.get('sources').map((source: any) => ({
url: source.url,
}));
create_obj() {
const sources = this.model.get('sources').map((source: any) => ({
url: source.url,
}));

this.obj = this.tileLayer = new WebGLTileLayer({
source: new GeoTIFF({
sources: sources,
}),
});
}

sourcesChanged() {
const newSources = this.model.get('sources').map((source: any) => ({
url: source.url,
}));

this.obj = this.tileLayer = new WebGLTileLayer({
source: new GeoTIFF({
sources: sources,
}),
});
}
if (newSources) {
const newSource = new GeoTIFF({
sources: newSources,
});
this.tileLayer.setSource(newSource);
}
}

<<<<<<< HEAD

sourcesChanged() {
const newSources = this.model.get('sources').map((source: any) => ({
Expand All @@ -135,4 +147,7 @@ export class GeoTIFFTileLayerView extends LayerView {

tileLayer: WebGLTileLayer;
>>>>>>> 7349011 (added GeoTIFFTileLayer)
=======
tileLayer: WebGLTileLayer;
>>>>>>> 06de91b (ApiKey)
}

0 comments on commit e1721d7

Please sign in to comment.