
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hslayers-cesium
Advanced tools
This library contains components to run HSLayers-NG user interface with Cesium 3D as the map renderer instead of, or in complement to, OpenLayers. See example
npm i hslayers-cesium
Import HsCesiumModule and add it to your AppModules imports:
import {HsCesiumModule} from 'hslayers-cesium';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, HslayersModule, HsCesiumModule],
In your component attach the HslayersCesiumComponent to HSlayers-NG:
constructor(
public hsCesiumConfig: HsCesiumConfig,
private hsLayoutService: HsLayoutService
) {
...
ngOnInit(): void {
this.hsLayoutService.mapSpaceRef.subscribe((mapSpace) => {
if (mapSpace?.viewContainerRef) {
mapSpace.viewContainerRef.createComponent(HslayersCesiumComponent);
}
});
}
Set path to cesium assets in hsCesiumConfig:
this.hsCesiumConfig.update({
cesiumBase: 'assets/cesium/',
In your angular.json file copy cesium assets to the previously mentioned directory (See example):
"assets": [
{
"glob": "**/*",
"input": "./node_modules/hslayers-ng/assets",
"output": "./assets/hslayers-ng/"
},
{
"glob": "**/*",
"input": "./node_modules/cesium/Source/Assets",
"output": "./assets/cesium/Assets"
},
{
"glob": "**/*",
"input": "./node_modules/cesium/Source/Widgets",
"output": "./assets/cesium/Widgets"
},
{
"glob": "**/*",
"input": "./node_modules/cesium/Source/Workers",
"output": "./assets/cesium/Workers"
}
],
"styles": [
"node_modules/ol/ol.css",
"node_modules/cesium/Build/Cesium/Widgets/widgets.css"
],
Use custom-webpack builder which is needed for Cesium
In angular.json
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "custom-webpack.config.js"
}
...
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
custom-webpack.config.js contents:
module.exports = {
node: {
// Resolve node module use of fs
fs: 'empty',
Buffer: false,
http: 'empty',
https: 'empty',
zlib: 'empty',
},
module: {
unknownContextCritical: false,
},
};
FAQs
HSLayers-NG 3D mapping library
We found that hslayers-cesium demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.