Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
id: '2',
source: 'testSource',
title: 'testTitle2',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'LineString',
coordinates: [[-72, 47.8], [-73.5, 47.4], [-72.4, 48.6]]
}
};
const feature3: Feature = {
id: '3',
source: 'testSource',
title: 'testTitle3',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'Polygon',
coordinates: [[[-71, 46.8], [-73, 47], [-71.2, 46.6]]]
}
};
this.overlayService.setFeatures([feature1, feature2, feature3]);
}
}
type: 'osm'
})
.subscribe(dataSource => {
this.map.addLayer(
this.layerService.createLayer({
title: 'OSM',
source: dataSource
})
);
});
const feature1: Feature = {
id: '1',
source: 'testSource',
title: 'testTitle',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'Point',
coordinates: [-73, 46.6]
}
};
const feature2: Feature = {
id: '2',
source: 'testSource',
title: 'testTitle2',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'LineString',
coordinates: [[-72, 47.8], [-73.5, 47.4], [-72.4, 48.6]]
handleFeatureFocus(feature: Feature) {
if (feature.type === FeatureType.Feature) {
this.overlayService.setFeatures([feature], OverlayAction.ZoomIfOutMapExtent);
}
}
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'Point',
coordinates: [-73, 46.6]
},
properties: {
attribute1: 'value1'
}
};
const feature2: Feature = {
id: '2',
source: 'Source1',
title: 'Title2',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'LineString',
coordinates: [[-72, 47.8], [-73.5, 47.4], [-72.4, 48.6]]
},
properties: {
attribute1: 'value2'
}
};
const feature3: Feature = {
id: '3',
source: 'Source2',
title: 'Title3',
type: FeatureType.Feature,
projection: 'EPSG:4326',
type: 'osm'
})
.subscribe(dataSource => {
this.map.addLayer(
this.layerService.createLayer({
title: 'OSM',
source: dataSource
})
);
});
const feature1: Feature = {
id: '1',
source: 'Source1',
title: 'Title1',
type: FeatureType.Feature,
projection: 'EPSG:4326',
geometry: {
type: 'Point',
coordinates: [-73, 46.6]
},
properties: {
attribute1: 'value1'
}
};
const feature2: Feature = {
id: '2',
source: 'Source1',
title: 'Title2',
type: FeatureType.Feature,
projection: 'EPSG:4326',